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
This commit is contained in:
PJ Fanning 2022-02-19 19:11:31 +00:00
parent 1d0b478c16
commit ddd3bc2f9f
1 changed files with 10 additions and 1 deletions

View File

@ -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;