|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.io.util.Temps
public class Temps
A utility class for creating temporary files.
This class allows to change the directory for temporary files via the class
property directory.
If the value of this property is null (which is the default),
the value of the system property java.io.tmpdir is used.
| Constructor Summary | |
|---|---|
protected |
Temps()
You can't instantiate this class. |
| Method Summary | |
|---|---|
static File |
createTempFile(String prefix)
Like createTempFile(String, String), but uses the default
suffix ".tmp". |
static File |
createTempFile(String prefix,
String suffix)
Like File.createTempFile(java.lang.String, java.lang.String, java.io.File), but uses the value of the
class property directory as the directory for temporary
files. |
static File |
getDirectory()
Returns the directory for temporary files. |
static void |
setDirectory(File directory)
Sets the directory for temporary files. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Temps()
| Method Detail |
|---|
public static File getDirectory()
null, which means that
the directory used for createTempFile(java.lang.String, java.lang.String) is determined by the
system property java.io.tmpdir.
public static void setDirectory(File directory)
null, the value of the system property
java.io.tmpdir is used by createTempFile(java.lang.String, java.lang.String).
public static final File createTempFile(String prefix,
String suffix)
throws IOException
File.createTempFile(java.lang.String, java.lang.String, java.io.File), but uses the value of the
class property directory as the directory for temporary
files.
If the value of this property is null, the directory is
determined by the value of the system property
java.io.tmpdir.
IOExceptiongetDirectory(),
setDirectory(java.io.File)
public static final File createTempFile(String prefix)
throws IOException
createTempFile(String, String), but uses the default
suffix ".tmp".
IOExceptiongetDirectory(),
setDirectory(java.io.File)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||