public static class TempFile.DefaultTempFileCreationStrategy extends Object implements TempFileCreationStrategy
TempFileCreationStrategy used by TempFile:
Files are collected into one directory and by default are deleted on exit from the VM.
Files can be kept by defining the system property poi.keep.tmp.files.| Constructor and Description |
|---|
DefaultTempFileCreationStrategy()
Creates the strategy so that it creates the temporary files in the default directory.
|
DefaultTempFileCreationStrategy(File dir)
Creates the strategy allowing to set the
|
| Modifier and Type | Method and Description |
|---|---|
File |
createTempFile(String prefix,
String suffix)
Creates a new and empty temporary file.
|
public DefaultTempFileCreationStrategy()
File.createTempFile(String, String)public DefaultTempFileCreationStrategy(File dir)
dir - The directory where the temporary files will be created (null to use the default directory).File.createTempFile(String, String, File)public File createTempFile(String prefix, String suffix) throws IOException
TempFileCreationStrategycreateTempFile in interface TempFileCreationStrategyprefix - The prefix to be used to generate the name of the temporary file.suffix - The suffix to be used to generate the name of the temporary file.IOException - If no temporary file could be created.Copyright © 2007-2022. All Rights Reserved.