garydgregory commented on code in PR #334:
URL: https://github.com/apache/commons-compress/pull/334#discussion_r1042844713


##########
src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java:
##########
@@ -720,6 +721,28 @@ public String getUnixSymlink(final ZipArchiveEntry entry) 
throws IOException {
         return null;
     }
 
+    /**
+     * Offset of the first local file header in the file.
+     *
+     * @return the length of the content before the first local file header
+     * @since 1.23
+     */
+    public long getFirstLocalFileHeaderOffset() {
+        return firstLocalFileHeaderOffset;
+    }
+
+    /**
+     * Returns an InputStream for reading the content before the first local 
file header.
+     *
+     * @return null if there is no content before the first local file header.
+     * Otherwise returns a stream to read the content before the first local 
file header.
+     * @since 1.23
+     */
+    public InputStream getContentBeforeFirstLocalFileHeader() {

Review Comment:
   See above.



##########
src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java:
##########
@@ -163,6 +163,7 @@ public class ZipFile implements Closeable {
 
     private long centralDirectoryStartDiskNumber, 
centralDirectoryStartRelativeOffset;
     private long centralDirectoryStartOffset;
+    private long firstLocalFileHeaderOffset = 0L;

Review Comment:
   No need to initialize to default value.



##########
src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java:
##########
@@ -720,6 +721,28 @@ public String getUnixSymlink(final ZipArchiveEntry entry) 
throws IOException {
         return null;
     }
 
+    /**
+     * Offset of the first local file header in the file.

Review Comment:
   Javadoc for getters should start with "Gets..."



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to