public final class TemporaryFileManager extends Object
Modifier and Type | Method and Description |
---|---|
static File |
createTempFile(String prefix,
String suffix)
Creates a new temp file.
|
static File |
getTempDirectory()
Gets the temp directory used by the temporary file manager.
|
static void |
register(File file)
Registers a new temporary file.
|
static void |
setReady(File file)
The specified file will be added to the set of temporary files that will be deleted when the
cleaner is activated.
|
static void |
shutdown()
Shuts down the manager.
|
static void |
shutdownDeleteAll()
Shuts down the manager and deletes all registered temporary files.
|
public static void register(File file)
file
- the filepublic static void setReady(File file)
file
- the filepublic static File createTempFile(String prefix, String suffix) throws IOException
prefix
- the prefixsuffix
- the suffixIOException
- Signals that an I/O exception has occurred.public static File getTempDirectory()
public static void shutdown()
public static void shutdownDeleteAll()
Copyright © 2016 SAPERION AG. All rights reserved.