diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2021-05-14 00:37:50 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2021-05-14 00:37:50 +0000 |
commit | 0614835c55f44ab6f3e9b0850ca51e0e53a65a49 (patch) | |
tree | 586c68c89edb0978a441facf0066ff56d84fa2c7 /poi-integration/src/test/java/org/apache/poi/stress/XSSFBFileHandler.java | |
parent | fe753d473788fc24030d7066654c56c33fff23b5 (diff) | |
download | poi-0614835c55f44ab6f3e9b0850ca51e0e53a65a49.tar.gz poi-0614835c55f44ab6f3e9b0850ca51e0e53a65a49.zip |
#65304 - Add commons-io as a dependency
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889871 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration/src/test/java/org/apache/poi/stress/XSSFBFileHandler.java')
-rw-r--r-- | poi-integration/src/test/java/org/apache/poi/stress/XSSFBFileHandler.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/XSSFBFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/XSSFBFileHandler.java index 1bc23c49ed..dd25e4148d 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/XSSFBFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/XSSFBFileHandler.java @@ -17,7 +17,6 @@ package org.apache.poi.stress; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -40,10 +39,8 @@ class XSSFBFileHandler extends AbstractFileHandler { @Override public void handleFile(InputStream stream, String path) throws Exception { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - IOUtils.copy(stream, out); + byte[] bytes = IOUtils.toByteArray(stream); - final byte[] bytes = out.toByteArray(); try (OPCPackage opcPackage = OPCPackage.open(new ByteArrayInputStream(bytes))) { testOne(opcPackage); } |