aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-02-19 19:11:31 +0000
committerPJ Fanning <fanningpj@apache.org>2022-02-19 19:11:31 +0000
commitddd3bc2f9f5af05190161aa8058da66e0db81b54 (patch)
treee2c711502ffca88822d996b078eb2ea794ffd27b
parent1d0b478c16f0d38ff66fe921da2b32df567f1515 (diff)
downloadpoi-ddd3bc2f9f5af05190161aa8058da66e0db81b54.tar.gz
poi-ddd3bc2f9f5af05190161aa8058da66e0db81b54.zip
support specific method to set zip entry max size
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898228 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java
index 572f7bdc52..807159ba0d 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java
@@ -39,7 +39,16 @@ import org.apache.poi.util.TempFile;
// how large a single entry in a zip-file should become at max
// can be overwritten via IOUtils.setByteArrayMaxOverride()
- private static final int MAX_ENTRY_SIZE = 100_000_000;
+ private static final int DEFAULT_MAX_ENTRY_SIZE = 100_000_000;
+ private static int MAX_ENTRY_SIZE = DEFAULT_MAX_ENTRY_SIZE;
+
+ public static void setMaxEntrySize(int maxEntrySize) {
+ MAX_ENTRY_SIZE = maxEntrySize;
+ }
+
+ public static int getMaxEntrySize() {
+ return MAX_ENTRY_SIZE;
+ }
private byte[] data;
private File tempFile;