|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.eclipse.update.core.Utilities
This class is a collection of utility functions that can be used for install processing
| Constructor Summary | |
Utilities()
|
|
| Method Summary | |
static void |
copy(InputStream is,
OutputStream os,
InstallMonitor monitor)
Copies specified input stream to the output stream. |
static File |
createLocalFile(File tmpDir,
String name)
Create a new working file. |
static File |
createWorkingDirectory()
Returns a new working directory (in temporary space). |
static void |
flushLocalFile()
Flushes all the keys from the local file map. |
static String |
format(Date date)
Formats a Date based on the default Locale If teh Date is null returns an empty String |
static File |
lookupLocalFile(String key)
Returns a previously cached local file (in temporary area) matching the specified key. |
static void |
mapLocalFile(String key,
File temp)
The file is associated with a lookup key. |
static CoreException |
newCoreException(String s,
int code,
Throwable e)
Creates a CoreException from some other exception. |
static CoreException |
newCoreException(String s,
String s1,
String s2,
CoreException e1,
CoreException e2)
Creates a CoreException from two other CoreException |
static CoreException |
newCoreException(String s,
Throwable e)
Creates a CoreException from some other exception. |
static void |
removeLocalFile(String key)
Removes the specified key from the local file map. |
static void |
shutdown()
Perform shutdown processing for temporary file handling. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Utilities()
| Method Detail |
public static File createWorkingDirectory()
throws IOException
IOException
public static File createLocalFile(File tmpDir,
String name)
throws IOException
tmpDir - directory location for new file. Any missing directory
levels are created (and marked for deletion on exit)name - optional file name, or null. If name is not
specified, a temporary name is generated.
IOExceptionlookupLocalFile(String)
public static void mapLocalFile(String key,
File temp)
key - optional lookup key, or null.temp - the local working filepublic static File lookupLocalFile(String key)
key - lookup key
null.public static void flushLocalFile()
public static void removeLocalFile(String key)
key - lookup key
public static void copy(InputStream is,
OutputStream os,
InstallMonitor monitor)
throws IOException,
InstallAbortedException
is - input streamos - output streammonitor - progress monitor
IOException
InstallAbortedException
public static CoreException newCoreException(String s,
int code,
Throwable e)
IStatus.ERROR
If the exception passed as a parameter is also a CoreException,
the new CoreException will contain all the status of the passed
CoreException.
s - exception stringcode - the code reportede - actual exception being reported
IStatus.ERROR
public static CoreException newCoreException(String s,
Throwable e)
IStatus.ERROR
If the exceptionpassed as a parameter is also a CoreException,
the new CoreException will contain all the status of the passed
CoreException.
s - exception stringe - actual exception being reported
IStatus.ERROR
public static CoreException newCoreException(String s,
String s1,
String s2,
CoreException e1,
CoreException e2)
s - overall exception strings1 - string for first detailed exceptions2 - string for second detailed exceptione1 - first detailed exceptione2 - second detailed exception
public static String format(Date date)
null returns an empty String
date - the Date to format
public static void shutdown()
|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||