diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-01-26 19:35:06 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-01-26 19:35:06 +0000 |
commit | fc49da56ae2e95b6eff27b23bfd0f07d109ac551 (patch) | |
tree | 9f5ab5f134feb6e3a9ef57062e927632261b4fbf /poi-examples/src | |
parent | 0ce3e462040c2796d0a653623ec7e5233933feb4 (diff) | |
download | poi-fc49da56ae2e95b6eff27b23bfd0f07d109ac551.tar.gz poi-fc49da56ae2e95b6eff27b23bfd0f07d109ac551.zip |
[bug-65849] use Files.createTempFile
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897515 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples/src')
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java index 06bc962d5d..1bb8409369 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java @@ -25,6 +25,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; +import java.nio.file.Files; import java.util.Calendar; import java.util.Enumeration; import java.util.HashMap; @@ -101,7 +102,7 @@ public final class BigGridDemo { } //Step 2. Generate XML file. - tmp = File.createTempFile("sheet", ".xml"); + tmp = Files.createTempFile("sheet", ".xml").toFile(); try ( FileOutputStream stream = new FileOutputStream(tmp); Writer fw = new OutputStreamWriter(stream, XML_ENCODING) |