public class EasyExcelTempFileCreationStrategy extends Object implements org.apache.poi.util.TempFileCreationStrategy
DefaultTempFileCreationStrategy will throw a
java.nio.file.NoSuchFileException. Therefore, it is necessary to verify the existence of the temporary file every
time it is created.| Modifier and Type | Field and Description |
|---|---|
static String |
DELETE_FILES_ON_EXIT
To use files.deleteOnExit after clean JVM exit, set the
-Dpoi.delete.tmp.files.on.exit JVM property |
static String |
POIFILES
Name of POI files directory in temporary directory.
|
| Constructor and Description |
|---|
EasyExcelTempFileCreationStrategy()
Creates the strategy so that it creates the temporary files in the default directory.
|
EasyExcelTempFileCreationStrategy(File dir)
Creates the strategy allowing to set the
|
| Modifier and Type | Method and Description |
|---|---|
File |
createTempDirectory(String prefix) |
File |
createTempFile(String prefix,
String suffix) |
public static final String POIFILES
public static final String DELETE_FILES_ON_EXIT
-Dpoi.delete.tmp.files.on.exit JVM propertypublic EasyExcelTempFileCreationStrategy()
File.createTempFile(String, String)public EasyExcelTempFileCreationStrategy(File dir)
dir - The directory where the temporary files will be created (null to use the default
directory).Files.createTempFile(Path, String, String, FileAttribute[])public File createTempFile(String prefix, String suffix) throws IOException
createTempFile in interface org.apache.poi.util.TempFileCreationStrategyIOExceptionpublic File createTempDirectory(String prefix) throws IOException
createTempDirectory in interface org.apache.poi.util.TempFileCreationStrategyIOExceptionCopyright © 2018–2024 Alibaba Group. All rights reserved.