RFR: 8278165: Clarify that ZipInputStream does not access the CEN fields for a ZipEntry
Brian Burkhalter
bpb at openjdk.org
Tue Sep 13 17:42:21 UTC 2022
On Wed, 31 Aug 2022 16:06:57 GMT, Lance Andersen <lancea at openjdk.org> wrote:
> Hi,
>
> Please review this update to the ZipInputStream class description to clarify that ZipInputStream walks sequentially through each Zip Entry contained within the Zip File. As a result, the CEN header for the Zip file entries are not read resulting in ZipInputStream not having access to information that is stored within the CEN Header fields such the as the external file attributes which can be used to store optional data such as Posix Permissions.
src/java.base/share/classes/java/util/zip/ZipInputStream.java line 49:
> 47: * The {@link #getNextEntry()} method is used to read the next ZIP file entry
> 48: * (Local file (LOC) header record in the ZIP format) and position the stream at
> 49: * the entry's file data. The file data may read using one of
of -> of the?
src/java.base/share/classes/java/util/zip/ZipInputStream.java line 56:
> 54: * {@code
> 55: * try (FileInputStream fis = new FileInputStream(jar.toFile());
> 56: * ZipInputStream zis = new ZipInputStream(fis)) {
The indentation seems weird in this code sample.
-------------
PR: https://git.openjdk.org/jdk/pull/10102
More information about the core-libs-dev
mailing list