public class InfoZipUnixExtraField extends Object implements ZipEntryExtraField
InfoZipUnixExtraFieldFactory
,
NewInfoZipUnixExtraField
Modifier and Type | Field and Description |
---|---|
static UnsignedShort |
CODE |
Constructor and Description |
---|
InfoZipUnixExtraField(Date lastAccessTime,
Date lastModificationTime)
Create a central header version of this object.
|
InfoZipUnixExtraField(Date lastAccessTime,
Date lastModificationTime,
UnsignedShort uid,
UnsignedShort gid)
Create a local header version of this object.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
encode(ZipBuilderConfiguration builder)
Encode this extra field's data for storing in a Zip file.
|
boolean |
equals(Object o) |
UnsignedShort |
getGid()
Get the owner group id for the Zip entry.
|
Date |
getLastAccessTime()
Get the Zip entry's last access time.
|
Date |
getLastModificationTime()
Get the Zip entry's last modification time.
|
UnsignedShort |
getUid()
Get the owner user id for the Zip entry.
|
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() |
public static final UnsignedShort CODE
public InfoZipUnixExtraField(Date lastAccessTime, Date lastModificationTime)
lastAccessTime
- The Zip entry's last access time.lastModificationTime
- The Zip entry's last modification time.public InfoZipUnixExtraField(Date lastAccessTime, Date lastModificationTime, UnsignedShort uid, UnsignedShort gid)
lastAccessTime
- The Zip entry's last access time.lastModificationTime
- The Zip entry's last modification time.uid
- The Zip entry's owner's user id.gid
- The Zip entry's owner's group id.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 ZipEntryExtraField
true
if this extra field comes from the Zip entry's local
header. false
if it comes from the Zip file's central directory.public UnsignedShort getUid()
null
if this is the central header
version of this object.public UnsignedShort getGid()
null
if this is the central header
version of this object.public Date getLastAccessTime()
public Date getLastModificationTime()
public byte[] encode(ZipBuilderConfiguration builder)
ZipEntryExtraField
encode
in interface ZipEntryExtraField
builder
- The configuration for the Zip builder object that is building
the Zip file.