| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.zip.ZipUtil
public abstract class ZipUtil
Utility class for handling DOS and Java time conversions.
| Constructor Summary | |
|---|---|
ZipUtil()
 | 
|
| Method Summary | |
|---|---|
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 ZipLong | 
toDosTime(java.util.Date time)
Convert a Date object to a DOS date/time field.  | 
static byte[] | 
toDosTime(long t)
Convert a Date object to a DOS date/time field.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ZipUtil()
| Method Detail | 
|---|
public static ZipLong toDosTime(java.util.Date time)
time - the Date to convert
ZipLongpublic static byte[] toDosTime(long t)
Stolen from InfoZip's fileio.c
t - number of milliseconds since the epoch
public 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)
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||