public abstract class ZipUtil
extends java.lang.Object
Constructor | Description |
---|---|
ZipUtil() |
Modifier and Type | Method | Description |
---|---|---|
static long |
adjustToLong(int i) |
Assumes a negative integer really is a positive integer that
has wrapped around and re-creates the original value.
|
static long |
dosToJavaTime(long dosTime) |
Converts DOS time to Java time (number of milliseconds since
epoch).
|
static java.util.Date |
fromDosTime(ZipLong zipDosTime) |
Convert a DOS date/time field to a Date object.
|
static byte[] |
toDosTime(long t) |
Convert a Date object to a DOS date/time field.
|
static void |
toDosTime(long t,
byte[] buf,
int offset) |
Convert a Date object to a DOS date/time field.
|
static ZipLong |
toDosTime(java.util.Date time) |
Convert a Date object to a DOS date/time field.
|
public static ZipLong toDosTime(java.util.Date time)
time
- the Date
to convertZipLong
public static byte[] toDosTime(long t)
Stolen from InfoZip's fileio.c
t
- number of milliseconds since the epochpublic static void toDosTime(long t, byte[] buf, int offset)
Stolen from InfoZip's fileio.c
t
- number of milliseconds since the epochbuf
- the output bufferoffset
- The offset within the output buffer of the first byte to be written.
must be non-negative and no larger than buf.length-4public static long adjustToLong(int i)
This methods is no longer used as of Apache Ant 1.9.0
i
- the value to treat as unsigned int.public static java.util.Date fromDosTime(ZipLong zipDosTime)
zipDosTime
- contains the stored DOS time.public static long dosToJavaTime(long dosTime)
dosTime
- long