|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.at4j.zip.ef.ExtendedTimestampExtraField
public class ExtendedTimestampExtraField
This ZipEntryExtraField stores zero or more of a Zip entry's last
modification, last access and original creation times, specified as
Date values in the UTC time zone.
If this field is from the central header, it only contains the last modification time or no time at all.
Instances of this object are immutable.
| Field Summary | |
|---|---|
static UnsignedShort |
CODE
The code that is used to identify this extra field in a Zip file. |
| Constructor Summary | |
|---|---|
ExtendedTimestampExtraField(boolean inLocalHeader,
Date lastModificationTime,
Date lastAccessTime,
Date originalCreationTime)
Create a new UniversalTimeExtraField object. |
|
| Method Summary | |
|---|---|
byte[] |
encode(ZipBuilderConfiguration builder)
Encode this extra field's data for storing in a Zip file. |
boolean |
equals(Object o)
|
Date |
getLastAccessed()
Get the time when the entity in the Zip entry was last accessed, if set. |
Date |
getLastModified()
Get the time of last modification for the entity in the Zip entry, if set. |
Date |
getOriginalCreationTime()
Get the time when the entity in the Zip entry was originally created, if set. |
int |
hashCode()
|
boolean |
isInLocalHeader()
Is this field stored in the Zip entry's local header or in the Zip file's central directory record? |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final UnsignedShort CODE
| Constructor Detail |
|---|
public ExtendedTimestampExtraField(boolean inLocalHeader,
Date lastModificationTime,
Date lastAccessTime,
Date originalCreationTime)
UniversalTimeExtraField object.
inLocalHeader - Is this extra field from the Zip entry's local
header (true) or from the Zip file's central header (false)?lastModificationTime - The last modification time of the entity in
the Zip entry. May be null.lastAccessTime - The last access time of the entity in the Zip
entry. May be null.originalCreationTime - The original creation of the entity in the
Zip entry. May be null.| Method Detail |
|---|
public boolean isInLocalHeader()
ZipEntryExtraField
The same ZipEntryExtraField type may have different properties
depending on if it is specified in the local or in the central header.
isInLocalHeader in interface ZipEntryExtraFieldtrue if this extra field comes from the Zip entry's local
header. false if it comes from the Zip file's central directory.public Date getLastModified()
null if this property was not set in the
extra field.public Date getLastAccessed()
If this extra field is from the Zip file's central header, this method
always returns null.
null if this property was not set in the extra
field.public Date getOriginalCreationTime()
If this extra field is from the Zip file's central header, this method
always returns null.
null if this property was not set in the
extra field.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic byte[] encode(ZipBuilderConfiguration builder)
ZipEntryExtraField
encode in interface ZipEntryExtraFieldbuilder - The configuration for the Zip builder object that is building
the Zip file.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||