You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/01/01 13:28:28 UTC

[commons-compress] branch master updated (8d1e12a7 -> 39da8401)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


    from 8d1e12a7 COMPRESS-613: Support for extra time data in Zip archives (#345)
     new f914fa3c COMPRESS-613: Support for extra time data in Zip archives #345
     new 1ae647eb Format tweaks
     new a789768e Javadoc
     new 39da8401 Javdoc

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                            |   1 +
 .../archivers/sevenz/SevenZArchiveEntry.java       |   4 +
 .../archivers/zip/X5455_ExtendedTimestamp.java     |  59 +++++------
 .../apache/commons/compress/utils/TimeUtils.java   | 115 ++++++++++-----------
 .../archivers/zip/ZipArchiveEntryTest.java         |   3 -
 5 files changed, 89 insertions(+), 93 deletions(-)


[commons-compress] 02/04: Format tweaks

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit 1ae647ebcc491fd09cb3295d6debfdf791a73bd2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 1 08:20:16 2023 -0500

    Format tweaks
---
 .../apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
index d1063b8f..b310d1f5 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZArchiveEntry.java
@@ -35,7 +35,9 @@ import org.apache.commons.compress.utils.TimeUtils;
  * @since 1.6
  */
 public class SevenZArchiveEntry implements ArchiveEntry {
+
     static final SevenZArchiveEntry[] EMPTY_SEVEN_Z_ARCHIVE_ENTRY_ARRAY = {};
+
     /**
      * Converts Java time to NTFS time.
      * @param date the Java time
@@ -47,6 +49,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
     public static long javaTimeToNtfsTime(final Date date) {
         return TimeUtils.toNtfsTime(date);
     }
+
     /**
      * Converts NTFS time (100 nanosecond units since 1 January 1601)
      * to Java time.
@@ -59,6 +62,7 @@ public class SevenZArchiveEntry implements ArchiveEntry {
     public static Date ntfsTimeToJavaTime(final long ntfsTime) {
         return TimeUtils.ntfsTimeToDate(ntfsTime);
     }
+
     private String name;
     private boolean hasStream;
     private boolean isDirectory;


[commons-compress] 01/04: COMPRESS-613: Support for extra time data in Zip archives #345

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit f914fa3c3cc4e062be6dc21e899e629813d95c50
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 1 08:19:44 2023 -0500

    COMPRESS-613: Support for extra time data in Zip archives #345
---
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 1c173f1b..89bc2d79 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -55,6 +55,7 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="add" issue="COMPRESS-614" dev="ggregory" due-to="Andre Brait, Gary Gregory">Use FileTime for time fields in SevenZipArchiveEntry #256.</action>
       <action type="add" issue="COMPRESS-621" dev="ggregory" due-to="Glavo">Fix calculation the offset of the first zip central directory entry #334.</action>
       <action type="add" issue="COMPRESS-633" dev="ggregory" due-to="Daniel Santos, Bruno P. Kinoshita, Gary Gregory">Add encryption support for SevenZ #332.</action>
+      <action type="add" issue="COMPRESS-613" dev="ggregory" due-to="Andre Brait, Gary Gregory, Bruno P. Kinoshita">Support for extra time data in Zip archives #345.</action>      
       <!-- UPDATE -->
       <action type="update" dev="ggregory" due-to="Dependabot">Bump mockito.version from 4.8.0 to 4.11.0 #328, #331, #340, #348.</action>
       <action type="update" dev="ggregory" due-to="Gary Gregory">Bump pmd from 6.50.0 to 6.52.0.</action>


[commons-compress] 04/04: Javdoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit 39da8401b4c47fe99f6ebeed3503a89bea5f614d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 1 08:28:23 2023 -0500

    Javdoc
    
    - sort members
    - Use ternary expression
    - Remove unused API
    - better parameter name
---
 .../apache/commons/compress/utils/TimeUtils.java   | 115 ++++++++++-----------
 .../archivers/zip/ZipArchiveEntryTest.java         |   3 -
 2 files changed, 54 insertions(+), 64 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/utils/TimeUtils.java b/src/main/java/org/apache/commons/compress/utils/TimeUtils.java
index b6db4d64..c8349f91 100644
--- a/src/main/java/org/apache/commons/compress/utils/TimeUtils.java
+++ b/src/main/java/org/apache/commons/compress/utils/TimeUtils.java
@@ -24,6 +24,15 @@ import java.util.concurrent.TimeUnit;
 
 /**
  * Utility class for handling time-related types and conversions.
+ * <p>
+ * Understanding Unix vs NTFS timestamps:
+ * </p>
+ * <ul>
+ * <li>A <a href="https://en.wikipedia.org/wiki/Unix_time">Unix timestamp</a> is a primitive long starting at the Unix Epoch on January 1st, 1970 at Coordinated
+ * Universal Time (UTC)</li>
+ * <li>An <a href="https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times">NTFS timestamp</a> is a file time is a 64-bit value that represents the number
+ * of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).</li>
+ * </ul>
  *
  * @since 1.23
  */
@@ -38,58 +47,24 @@ public final class TimeUtils {
     /**
      * <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724290%28v=vs.85%29.aspx">Windows File Times</a>
      * <p>
-     * A file time is a 64-bit value that represents the number of
-     * 100-nanosecond intervals that have elapsed since 12:00
-     * A.M. January 1, 1601 Coordinated Universal Time (UTC).
-     * This is the offset of Windows time 0 to Unix epoch in 100-nanosecond intervals.
+     * A file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated
+     * Universal Time (UTC). This is the offset of Windows time 0 to Unix epoch in 100-nanosecond intervals.
      * </p>
      */
     static final long WINDOWS_EPOCH_OFFSET = -116444736000000000L;
 
-    /**
-     * Converts standard UNIX time (in seconds, UTC/GMT) to {@link FileTime}.
-     *
-     * @param time UNIX timestamp
-     * @return the corresponding FileTime
-     */
-    public static FileTime unixTimeToFileTime(final long time) {
-        return FileTime.from(time, TimeUnit.SECONDS);
-    }
-
-    /**
-     * Converts {@link FileTime} to standard UNIX time.
-     *
-     * @param time the original FileTime
-     * @return the UNIX timestamp
-     */
-    public static long toUnixTime(final FileTime time) {
-        return time.to(TimeUnit.SECONDS);
-    }
-
-    /**
-     * Converts Java time (milliseconds since Epoch) to standard UNIX time.
-     *
-     * @param time the original Java time
-     * @return the UNIX timestamp
-     */
-    public static long javaTimeToUnixTime(final long time) {
-        return time / 1000L;
-    }
-
     /**
      * Tests whether a FileTime can be safely represented in the standard UNIX time.
      *
-     * <p>If the FileTime is null, this method always returns true.</p>
+     * <p>
+     * TODO ? If the FileTime is null, this method always returns true.
+     * </p>
      *
      * @param time the FileTime to evaluate, can be null
      * @return true if the time exceeds the minimum or maximum UNIX time, false otherwise
      */
     public static boolean isUnixTime(final FileTime time) {
-        if (time == null) {
-            return true;
-        }
-        final long fileTimeToUnixTime = toUnixTime(time);
-        return isUnixTime(fileTimeToUnixTime);
+        return time == null ? true : isUnixTime(toUnixTime(time));
     }
 
     /**
@@ -131,20 +106,18 @@ public final class TimeUtils {
     }
 
     /**
-     * Converts {@link FileTime} to a {@link Date}.
-     * If the provided FileTime is {@code null}, the returned Date is also {@code null}.
+     * Converts {@link FileTime} to a {@link Date}. If the provided FileTime is {@code null}, the returned Date is also {@code null}.
      *
-     * @param time the file time to be converted.
+     * @param fileTime the file time to be converted.
      * @return a {@link Date} which corresponds to the supplied time, or {@code null} if the time is {@code null}.
      * @see TimeUtils#toFileTime(Date)
      */
-    public static Date toDate(final FileTime time) {
-        return time != null ? new Date(time.toMillis()) : null;
+    public static Date toDate(final FileTime fileTime) {
+        return fileTime != null ? new Date(fileTime.toMillis()) : null;
     }
 
     /**
-     * Converts {@link Date} to a {@link FileTime}.
-     * If the provided Date is {@code null}, the returned FileTime is also {@code null}.
+     * Converts {@link Date} to a {@link FileTime}. If the provided Date is {@code null}, the returned FileTime is also {@code null}.
      *
      * @param date the date to be converted.
      * @return a {@link FileTime} which corresponds to the supplied date, or {@code null} if the date is {@code null}.
@@ -164,30 +137,40 @@ public final class TimeUtils {
         return toNtfsTime(date.getTime());
     }
 
+    /**
+     * Converts a {@link FileTime} to NTFS time (100-nanosecond units since 1 January 1601).
+     *
+     * @param fileTime the FileTime
+     * @return the NTFS time in 100-nanosecond units
+     *
+     * @see TimeUtils#WINDOWS_EPOCH_OFFSET
+     * @see TimeUtils#ntfsTimeToFileTime(long)
+     */
+    public static long toNtfsTime(final FileTime fileTime) {
+        final Instant instant = fileTime.toInstant();
+        final long javaHundredNanos = (instant.getEpochSecond() * HUNDRED_NANOS_PER_SECOND) + (instant.getNano() / 100);
+        return Math.subtractExact(javaHundredNanos, WINDOWS_EPOCH_OFFSET);
+    }
+
     /**
      * Converts Java time (milliseconds since Epoch) to NTFS time.
      *
-     * @param time the Java time
+     * @param javaTime the Java time
      * @return the NTFS time
      */
-    public static long toNtfsTime(final long time) {
-        final long javaHundredNanos = time * HUNDRED_NANOS_PER_MILLISECOND;
+    public static long toNtfsTime(final long javaTime) {
+        final long javaHundredNanos = javaTime * HUNDRED_NANOS_PER_MILLISECOND;
         return Math.subtractExact(javaHundredNanos, WINDOWS_EPOCH_OFFSET);
     }
 
     /**
-     * Converts a {@link FileTime} to NTFS time (100-nanosecond units since 1 January 1601).
-     *
-     * @param time the FileTime
-     * @return the NTFS time in 100-nanosecond units
+     * Converts {@link FileTime} to standard UNIX time.
      *
-     * @see TimeUtils#WINDOWS_EPOCH_OFFSET
-     * @see TimeUtils#ntfsTimeToFileTime(long)
+     * @param fileTime the original FileTime
+     * @return the UNIX timestamp
      */
-    public static long toNtfsTime(final FileTime time) {
-        final Instant instant = time.toInstant();
-        final long javaHundredNanos = (instant.getEpochSecond() * HUNDRED_NANOS_PER_SECOND) + (instant.getNano() / 100);
-        return Math.subtractExact(javaHundredNanos, WINDOWS_EPOCH_OFFSET);
+    public static long toUnixTime(final FileTime fileTime) {
+        return fileTime.to(TimeUnit.SECONDS);
     }
 
     /**
@@ -201,7 +184,17 @@ public final class TimeUtils {
         return FileTime.from(Instant.ofEpochSecond(instant.getEpochSecond(), (instant.getNano() / 100) * 100));
     }
 
+    /**
+     * Converts standard UNIX time (in seconds, UTC/GMT) to {@link FileTime}.
+     *
+     * @param time UNIX timestamp
+     * @return the corresponding FileTime
+     */
+    public static FileTime unixTimeToFileTime(final long time) {
+        return FileTime.from(time, TimeUnit.SECONDS);
+    }
+
     /** Private constructor to prevent instantiation of this utility class. */
-    private TimeUtils(){
+    private TimeUtils() {
     }
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
index aad70c47..fccbc076 100644
--- a/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
@@ -465,7 +465,6 @@ public class ZipArchiveEntryTest {
         assertEquals(time, ze.getLastModifiedTime().toMillis());
         X5455_ExtendedTimestamp extendedTimestamp = (X5455_ExtendedTimestamp) ze.getExtraField(X5455_ExtendedTimestamp.HEADER_ID);
         assertNotNull(extendedTimestamp);
-        assertEquals(TimeUtils.javaTimeToUnixTime(time), extendedTimestamp.getModifyTime().getValue());
         assertEquals(TimeUtils.toUnixTime(lastAccessTime), extendedTimestamp.getAccessTime().getValue());
         assertNull(extendedTimestamp.getCreateTime());
         X000A_NTFS ntfs = (X000A_NTFS) ze.getExtraField(X000A_NTFS.HEADER_ID);
@@ -487,7 +486,6 @@ public class ZipArchiveEntryTest {
         assertEquals(time, ze.getLastModifiedTime().toMillis());
         X5455_ExtendedTimestamp extendedTimestamp = (X5455_ExtendedTimestamp) ze.getExtraField(X5455_ExtendedTimestamp.HEADER_ID);
         assertNotNull(extendedTimestamp);
-        assertEquals(TimeUtils.javaTimeToUnixTime(time), extendedTimestamp.getModifyTime().getValue());
         assertNull(extendedTimestamp.getAccessTime());
         assertEquals(TimeUtils.toUnixTime(creationTime), extendedTimestamp.getCreateTime().getValue());
         X000A_NTFS ntfs = (X000A_NTFS) ze.getExtraField(X000A_NTFS.HEADER_ID);
@@ -511,7 +509,6 @@ public class ZipArchiveEntryTest {
         assertEquals(time, ze.getLastModifiedTime().toMillis());
         X5455_ExtendedTimestamp extendedTimestamp = (X5455_ExtendedTimestamp) ze.getExtraField(X5455_ExtendedTimestamp.HEADER_ID);
         assertNotNull(extendedTimestamp);
-        assertEquals(TimeUtils.javaTimeToUnixTime(time), extendedTimestamp.getModifyTime().getValue());
         assertEquals(TimeUtils.toUnixTime(accessTime), extendedTimestamp.getAccessTime().getValue());
         assertEquals(TimeUtils.toUnixTime(creationTime), extendedTimestamp.getCreateTime().getValue());
         X000A_NTFS ntfs = (X000A_NTFS) ze.getExtraField(X000A_NTFS.HEADER_ID);


[commons-compress] 03/04: Javadoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit a789768e54aef4eb2db04c3ab57ed57332b9b68e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 1 08:27:06 2023 -0500

    Javadoc
    
    - Better parameter name
    - Use ternary expression
---
 .../archivers/zip/X5455_ExtendedTimestamp.java     | 59 +++++++++++-----------
 1 file changed, 30 insertions(+), 29 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java b/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
index 2869cfc3..1e030268 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
@@ -138,17 +138,14 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
      * @return ZipLong
      */
     private static ZipLong fileTimeToZipLong(final FileTime time) {
-        if (time == null) {
-            return null;
-        }
-        return unixTimeToZipLong(TimeUtils.toUnixTime(time));
+        return time == null ? null : unixTimeToZipLong(TimeUtils.toUnixTime(time));
     }
 
-    private static ZipLong unixTimeToZipLong(final long l) {
-        if (!TimeUtils.isUnixTime(l)) {
-            throw new IllegalArgumentException("X5455 timestamps must fit in a signed 32 bit integer: " + l);
+    private static ZipLong unixTimeToZipLong(final long unixTime) {
+        if (!TimeUtils.isUnixTime(unixTime)) {
+            throw new IllegalArgumentException("X5455 timestamps must fit in a signed 32 bit integer: " + unixTime);
         }
-        return new ZipLong(l);
+        return new ZipLong(unixTime);
     }
 
     private static Date zipLongToDate(final ZipLong unixTime) {
@@ -203,7 +200,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns the access time as a java.util.Date
+     * Gets the access time as a java.util.Date
      * of this zip entry, or null if no such timestamp exists in the zip entry.
      * The milliseconds are always zeroed out, since the underlying data
      * offers only per-second precision.
@@ -215,7 +212,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns the access time as a {@link FileTime}
+     * Gets the access time as a {@link FileTime}
      * of this zip entry, or null if no such timestamp exists in the zip entry.
      * The milliseconds are always zeroed out, since the underlying data
      * offers only per-second precision.
@@ -228,7 +225,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns the access time (seconds since epoch) of this zip entry
+     * Gets the access time (seconds since epoch) of this zip entry
      * as a ZipLong object, or null if no such timestamp exists in the
      * zip entry.
      *
@@ -239,7 +236,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * The actual data to put into central directory data - without Header-ID
+     * Gets the actual data to put into central directory data - without Header-ID
      * or length specifier.
      *
      * @return the central directory data
@@ -252,7 +249,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Length of the extra field in the local file data - without
+     * Gets the length of the extra field in the local file data - without
      * Header-ID or length specifier.
      *
      * <p>For X5455 the central length is often smaller than the
@@ -268,15 +265,17 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
 
     /**
      * <p>
-     * Returns the create time as a a java.util.Date
+     * Gets the create time as a a java.util.Date
      * of this zip entry, or null if no such timestamp exists in the zip entry.
      * The milliseconds are always zeroed out, since the underlying data
      * offers only per-second precision.
-     * </p><p>
+     * </p>
+     * <p>
      * Note: modern linux file systems (e.g., ext2)
      * do not appear to store a "create time" value, and so
      * it's usually omitted altogether in the zip extra
-     * field.  Perhaps other unix systems track this.
+     * field. Perhaps other unix systems track this.
+     * </p>
      *
      * @return create time as java.util.Date or null.
      */
@@ -285,7 +284,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns the create time as a {@link FileTime}
+     * Gets the create time as a {@link FileTime}
      * of this zip entry, or null if no such timestamp exists in the zip entry.
      * The milliseconds are always zeroed out, since the underlying data
      * offers only per-second precision.
@@ -299,14 +298,16 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
 
     /**
      * <p>
-     * Returns the create time (seconds since epoch) of this zip entry
+     * Gets the create time (seconds since epoch) of this zip entry
      * as a ZipLong object, or null if no such timestamp exists in the
      * zip entry.
-     * </p><p>
+     * </p>
+     * <p>
      * Note: modern linux file systems (e.g., ext2)
      * do not appear to store a "create time" value, and so
      * it's usually omitted altogether in the zip extra
-     * field.  Perhaps other unix systems track this.
+     * field. Perhaps other unix systems track this.
+     * </p>
      *
      * @return create time (seconds since epoch) or null.
      */
@@ -331,7 +332,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     public byte getFlags() { return flags; }
 
     /**
-     * The Header-ID.
+     * Gets the Header-ID.
      *
      * @return the value for the header id for this extrafield
      */
@@ -341,7 +342,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * The actual data to put into local file data - without Header-ID
+     * Gets the actual data to put into local file data - without Header-ID
      * or length specifier.
      *
      * @return get the data
@@ -370,7 +371,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Length of the extra field in the local file data - without
+     * Gets the length of the extra field in the local file data - without
      * Header-ID or length specifier.
      *
      * @return a {@code ZipShort} for the length of the data of this extra field
@@ -385,7 +386,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns the modify time as a java.util.Date
+     * Gets the modify time as a java.util.Date
      * of this zip entry, or null if no such timestamp exists in the zip entry.
      * The milliseconds are always zeroed out, since the underlying data
      * offers only per-second precision.
@@ -397,7 +398,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns the modify time as a {@link FileTime}
+     * Gets the modify time as a {@link FileTime}
      * of this zip entry, or null if no such timestamp exists in the zip entry.
      * The milliseconds are always zeroed out, since the underlying data
      * offers only per-second precision.
@@ -410,7 +411,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns the modify time (seconds since epoch) of this zip entry
+     * Gets the modify time (seconds since epoch) of this zip entry
      * as a ZipLong object, or null if no such timestamp exists in the
      * zip entry.
      *
@@ -436,7 +437,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns whether bit0 of the flags byte is set or not,
+     * Tests whether bit0 of the flags byte is set or not,
      * which should correspond to the presence or absence of
      * a modify timestamp in this particular zip entry.
      *
@@ -447,7 +448,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns whether bit1 of the flags byte is set or not,
+     * Tests whether bit1 of the flags byte is set or not,
      * which should correspond to the presence or absence of
      * a "last access" timestamp in this particular zip entry.
      *
@@ -458,7 +459,7 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
     }
 
     /**
-     * Returns whether bit2 of the flags byte is set or not,
+     * Tests whether bit2 of the flags byte is set or not,
      * which should correspond to the presence or absence of
      * a create timestamp in this particular zip entry.
      *