|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.util.TransientFileFactory
The TransientFileFactory
utility class can be used to create
transient files, i.e. temporary files that are automatically
removed once the associated File
object is reclaimed by the
garbage collector.
Method Summary | |
File |
createTransientFile(String prefix,
String suffix,
File directory)
Same as File.createTempFile(String, String, File) except that
the newly-created file will be automatically deleted once the
returned File object has been gc'ed. |
static TransientFileFactory |
getInstance()
Returns the singleton TransientFileFactory instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static TransientFileFactory getInstance()
TransientFileFactory
instance.
public File createTransientFile(String prefix, String suffix, File directory) throws IOException
File.createTempFile(String, String, File)
except that
the newly-created file will be automatically deleted once the
returned File
object has been gc'ed.
prefix
- The prefix string to be used in generating the file's
name; must be at least three characters longsuffix
- The suffix string to be used in generating the file's
name; may be null
, in which case the
suffix ".tmp"
will be useddirectory
- The directory in which the file is to be created, or
null
if the default temporary-file
directory is to be used
IOException
- If a file could not be created
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |