[bug-68987] support allowStoredEntriesWithDataDescriptor=true when reading zip data

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917587 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2024-05-08 22:32:22 +00:00
parent c0c70cac7a
commit b91827e029
1 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
@ -189,7 +190,8 @@ public final class ZipHelper {
final InputStream processStream = closeStream ? checkedStream : new NoCloseInputStream(checkedStream);
// Open as a proper zip stream
return new ZipArchiveThresholdInputStream(new ZipArchiveInputStream(processStream));
return new ZipArchiveThresholdInputStream(new ZipArchiveInputStream(
processStream, StandardCharsets.UTF_8.name(), false, true));
}
/**