com.atlassian.core.spool
Class DefaultSpoolFileFactory
java.lang.Object
com.atlassian.core.spool.DefaultSpoolFileFactory
- All Implemented Interfaces:
- FileFactory
public class DefaultSpoolFileFactory
- extends java.lang.Object
- implements FileFactory
Default file factory for spooling. Creates a new temporary file via File::createTempFile().
The file is automatically scheduled for deletion via File::deleteOnExit()
- See Also:
File.createTempFile(String, String, File),
File.deleteOnExit()
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSpoolFileFactory
public DefaultSpoolFileFactory()
getInstance
public static DefaultSpoolFileFactory getInstance()
- Returns:
- a singleton instance of this file factory, using default settings
setSpoolPrefix
public void setSpoolPrefix(java.lang.String spoolPrefix)
setSpoolSuffix
public void setSpoolSuffix(java.lang.String spoolSuffix)
setSpoolDirectory
public void setSpoolDirectory(java.io.File spoolDirectory)
createNewFile
public java.io.File createNewFile()
throws java.io.IOException
- Description copied from interface:
FileFactory
- Create a new file based on the strategy of the factory. Factories should ensure that the file returned exists.
- Specified by:
createNewFile in interface FileFactory
- Returns:
- A newly created file
- Throws:
java.io.IOException
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.