com.atlassian.core.spool
Class DefaultSpoolFileFactory
java.lang.Object
com.atlassian.core.spool.DefaultSpoolFileFactory
- All Implemented Interfaces:
- FileFactory
public class DefaultSpoolFileFactory
- extends 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(String spoolPrefix)
setSpoolSuffix
public void setSpoolSuffix(String spoolSuffix)
setSpoolDirectory
public void setSpoolDirectory(File spoolDirectory)
createNewFile
public File createNewFile()
throws 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:
IOException
Copyright © 2015 Atlassian. All rights reserved.