| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | DOS_TIME_MIN
Smallest date/time ZIP can handle. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: the unsigned int as a long.the value to treat as unsigned int. i)Assumes a negative integer really is a positive integer that has wrapped around and re-creates the original value. |
| pack-priv static boolean | Returns: booleanWhether this library is able to read or write the given entry. |
| pack-priv static void | checkRequestedFeatures(ZipEntry ze)
Checks whether the entry requires features not (yet) supported by the library and throws an exception if it does. |
| pack-priv static byte[] | Returns: byte[]byte[] from)Create a copy of the given array - or return null if the argument is null. |
| public static long | Returns: longlong dosTime)Converts DOS time to Java time (number of milliseconds since epoch). |
| public static Date | Returns: a Date instance corresponding to the given time.contains the stored DOS time. zipDosTime)Convert a DOS date/time field to a Date object. |
| private static String | getUnicodeStringIfOriginalMatches(AbstractUnicodeExtraField
AbstractUnicodeExtraField f, byte[] byte[] orig)If the stored CRC matches the one of the given name, return the Unicode name of the given field. |
| pack-priv static void | setNameAndCommentFromExtraFields(ZipEntry
ZipEntry ze, byte[] byte[] originalNameBytes, byte[] byte[] commentBytes)If the entry has Unicode*ExtraFields and the CRCs of the names/comments match those of the extra fields, transfer the known Unicode values from the extra field. |
| private static boolean | Returns: true if the entry isn't encrypted at allWhether this library supports the encryption used by the given entry. |
| private static boolean | Returns: true if the compression method is STORED or DEFLATEDWhether this library supports the compression method used by the given entry. |
| public static ZipLong | |
| public static byte[] | Returns: the date as a byte arraynumber of milliseconds since the epoch t)Convert a Date object to a DOS date/time field. |
| public static void | toDosTime(long
number of milliseconds since the epoch t, byte[] the output buffer buf, int The offset within the output buffer of the first byte to be written.
must be non-negative and no larger than offset)buf.length-4Convert a Date object to a DOS date/time field. |
| pack-priv static void |
| DOS_TIME_MIN | back to summary |
|---|---|
| private static final byte[] DOS_TIME_MIN Smallest date/time ZIP can handle. | |
| ZipUtil | back to summary |
|---|---|
| public ZipUtil() | |
| adjustToLong | back to summary |
|---|---|
| public static long adjustToLong(int i) Assumes a negative integer really is a positive integer that has wrapped around and re-creates the original value. This methods is no longer used as of Apache Ant 1.9.0
| |
| canHandleEntryData | back to summary |
|---|---|
| pack-priv static boolean canHandleEntryData(ZipEntry entry) Whether this library is able to read or write the given entry.
| |
| checkRequestedFeatures | back to summary |
|---|---|
| pack-priv static void checkRequestedFeatures(ZipEntry ze) throws UnsupportedZipFeatureException Checks whether the entry requires features not (yet) supported by the library and throws an exception if it does. | |
| copy | back to summary |
|---|---|
| pack-priv static byte[] copy(byte[] from) Create a copy of the given array - or return null if the argument is null.
| |
| dosToJavaTime | back to summary |
|---|---|
| public static long dosToJavaTime(long dosTime) Converts DOS time to Java time (number of milliseconds since epoch).
| |
| fromDosTime | back to summary |
|---|---|
| public static Date fromDosTime(ZipLong zipDosTime) Convert a DOS date/time field to a Date object. | |
| getUnicodeStringIfOriginalMatches | back to summary |
|---|---|
| private static String getUnicodeStringIfOriginalMatches(AbstractUnicodeExtraField f, byte[] orig) If the stored CRC matches the one of the given name, return the Unicode name of the given field. If the field is null or the CRCs don't match, return null instead.
| |
| setNameAndCommentFromExtraFields | back to summary |
|---|---|
| pack-priv static void setNameAndCommentFromExtraFields(ZipEntry ze, byte[] originalNameBytes, byte[] commentBytes) If the entry has Unicode*ExtraFields and the CRCs of the names/comments match those of the extra fields, transfer the known Unicode values from the extra field.
| |
| supportsEncryptionOf | back to summary |
|---|---|
| private static boolean supportsEncryptionOf(ZipEntry entry) Whether this library supports the encryption used by the given entry.
| |
| supportsMethodOf | back to summary |
|---|---|
| private static boolean supportsMethodOf(ZipEntry entry) Whether this library supports the compression method used by the given entry.
| |
| toDosTime | back to summary |
|---|---|
| public static ZipLong toDosTime(Date time) Convert a Date object to a DOS date/time field. | |
| toDosTime | back to summary |
|---|---|
| public static byte[] toDosTime(long t) Convert a Date object to a DOS date/time field. Stolen from InfoZip's
| |
| toDosTime | back to summary |
|---|---|
| public static void toDosTime(long t, byte[] buf, int offset) Convert a Date object to a DOS date/time field. Stolen from InfoZip's
| |
| toDosTime | back to summary |
|---|---|
| pack-priv static void toDosTime(Calendar c, long t, byte[] buf, int offset) | |