public class NewInfoZipUnixExtraField extends Object implements ZipEntryExtraField
The local header version contains UID/GID information. The central header version is empty.
NewInfoZipUnixExtraFieldFactory
,
InfoZipUnixExtraField
Modifier and Type | Field and Description |
---|---|
static NewInfoZipUnixExtraField |
CENTRAL_HEADER_VERSION
This is the central header version of this extra field.
|
static UnsignedShort |
CODE |
Constructor and Description |
---|
NewInfoZipUnixExtraField(UnsignedShort uid,
UnsignedShort gid)
This creates the local header version of this extra field.
|
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.
|
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 static final NewInfoZipUnixExtraField CENTRAL_HEADER_VERSION
public NewInfoZipUnixExtraField(UnsignedShort uid, UnsignedShort gid)
uid
- The owner user id.gid
- The owner 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 byte[] encode(ZipBuilderConfiguration builder)
ZipEntryExtraField
encode
in interface ZipEntryExtraField
builder
- The configuration for the Zip builder object that is building
the Zip file.