|
Eclipse Platform 2.0 |
||||||||||
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 key,
String name)
Create a new working file. |
static File |
createWorkingDirectory()
Returns a new working directory (in temporary space). |
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 CoreException |
newCoreException(String s,
String s1,
String s2,
Throwable e1,
Throwable e2)
Creates a CoreException from two other exception |
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 key, String name) throws IOException
tmpDir
- directory location for new file. Any missing directory
levels are created (and marked for deletion on exit)key
- optional lookup key, or null
.name
- optional file name, or null
. If name is not
specified, a temporary name is generated.
IOException
lookupLocalFile(String)
public static File lookupLocalFile(String key)
key
- lookup key
null
.public static void removeLocalFile(String key)
key
- lookup keypublic 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, 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, Throwable e1, Throwable 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.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |