Top Description Methods
org.apache.poi.util

public Interface TempFileCreationStrategy

Known Direct Implementers
org.apache.poi.util.DefaultTempFileCreationStrategy
Imports
java.io.File, .IOException

Interface used by the TempFile utility class to create temporary files. Classes that implement a TempFileCreationStrategy attempt to handle the cleanup of temporary files. Examples include:

Method Summary

Modifier and TypeMethod and Description
public File

Returns:

The path to the newly created and empty temporary directory.
createTempDirectory
(String
The directory name to be used to generate the name of the temporary directory.
prefix
)

Creates a new and empty temporary directory.

public File

Returns:

The path to the newly created and empty temporary file.
createTempFile
(String
The prefix to be used to generate the name of the temporary file.
prefix
,
String
The suffix to be used to generate the name of the temporary file.
suffix
)

Creates a new and empty temporary file.

Method Detail

createTempDirectoryback to summary
public File createTempDirectory(String prefix) throws IOException

Creates a new and empty temporary directory.

Parameters
prefix:String

The directory name to be used to generate the name of the temporary directory.

Returns:File

The path to the newly created and empty temporary directory.

Exceptions
IOException:
If no temporary directory could be created.
Since
POI 3.15 beta 3.
createTempFileback to summary
public File createTempFile(String prefix, String suffix) throws IOException

Creates a new and empty temporary file.

Parameters
prefix:String

The prefix to be used to generate the name of the temporary file.

suffix:String

The suffix to be used to generate the name of the temporary file.

Returns:File

The path to the newly created and empty temporary file.

Exceptions
IOException:
If no temporary file could be created.