|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.schlichtherle.util.zip.DateTimeConverter
public abstract class DateTimeConverter
Converts Java time values to DOS date/time values and vice versa. This class has been introduced in order to enhance interoperability between different flavours of the ZIP file format specification when converting date/time from the serialized DOS format in a ZIP file to the local system time, which is represented by a UNIX-like encoding by the Java API.
This class is thread-safe.
Field Summary | |
---|---|
static DateTimeConverter |
JAR
This instance applies the schedule for Daylight Saving Time (DST), i.e. all time conversions will apply DST where appropriate to a particular date. |
static DateTimeConverter |
ZIP
This instance ignores the schedule for Daylight Saving Time (DST), i.e. all time conversions will use the same raw offset and current DST savings, regardless of whether DST savings should be applied to a particular date or not. |
Constructor Summary | |
---|---|
DateTimeConverter()
|
Method Summary | |
---|---|
protected abstract TimeZone |
createTimeZone()
Returns a new timezone to use for date/time conversion. |
protected abstract boolean |
roundUp(long jTime)
Returns whether a Java time should be rounded up or down to the next two second interval when converting it to a DOS date/time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DateTimeConverter JAR
This behaviour provides best interoperability with:
jar
utility
and java.util.zip
packageunzip
public static final DateTimeConverter ZIP
This behavior provides best interoperability with:
Constructor Detail |
---|
public DateTimeConverter()
Method Detail |
---|
protected abstract TimeZone createTimeZone()
rules
.
null
.protected abstract boolean roundUp(long jTime)
jTime
- The number of milliseconds since midnight, January 1st,
1970 AD UTC (called the epoch alias Java time).
yes
for round-up, no
for round-down.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |