This class uses the ASi extra field in the format:
Value Size Description
----- ---- -----------
(Unix3) 0x756e Short tag for this extra block type
TSize Short total data size for this block
CRC Long CRC-32 of the remaining data
Mode Short file permissions
SizDev Long symlink'd size OR major/minor dev num
UID Short user ID
GID Short group ID
(var.) variable symbolic link filename
taken from appnote.iz (Info-ZIP note, 981119) found at ftp://ftp.uu.net/pub/archiving/zip/doc/
Short is two bytes and Long is four bytes in big endian byte and word order, device numbers are currently not supported.
Since the documentation this class is based upon doesn't mention the character encoding of the file name at all, it is assumed that it uses the current platform's default encoding.
| Modifier and Type | Field and Description |
|---|---|
| private CRC32 | crc
Instance used to calculate checksums. |
| private boolean | dirFlag
Is this an entry for a directory? |
| private int | gid
Group ID. |
| private static final ZipShort | |
| private String | link
File this entry points to, if it is a symbolic link. |
| private int | mode
Standard Unix stat(2) file mode. |
| private int | uid
User ID. |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public byte[] | Returns: the local file dataImplements org. |
| public ZipShort | Returns: the centralDirectory lengthImplements org. |
| public int | |
| public ZipShort | Returns: the value for the header id for this extrafieldImplements org. |
| public String | Returns: name of the file this entry links to if it is a symbolic link, the empty string otherwise.Name of linked file |
| public byte[] | Returns: get the dataImplements org. |
| public ZipShort | Returns: aZipShort for the length of the data of this extra fieldImplements org. |
| public int | |
| protected int | Returns: the type with the modethe mode mode)Get the file mode for given permissions with the correct file type. |
| public int | |
| public boolean | |
| public boolean | |
| public void | parseFromLocalFileData(byte[]
an array of bytes data, int the start offset offset, int the number of bytes in the array from offset length)Implements org. |
| public void | setDirectory(boolean
if true, this entry is a directory dirFlag)Indicate whether this entry is a directory. |
| public void | |
| public void | setLinkedFile(String
Name of the file this entry links to, empty String
if it is not a symbolic link. name)Indicate that this entry is a symbolic link to the given filename. |
| public void | |
| public void |
| crc | back to summary |
|---|---|
| private CRC32 crc Instance used to calculate checksums.
| |
| dirFlag | back to summary |
|---|---|
| private boolean dirFlag Is this an entry for a directory?
| |
| gid | back to summary |
|---|---|
| private int gid Group ID.
| |
| HEADER_ID | back to summary |
|---|---|
| private static final ZipShort HEADER_ID | |
| link | back to summary |
|---|---|
| private String link File this entry points to, if it is a symbolic link. empty string - if entry is not a symbolic link.
| |
| mode | back to summary |
|---|---|
| private int mode Standard Unix stat(2) file mode.
| |
| uid | back to summary |
|---|---|
| private int uid User ID.
| |
| WORD | back to summary |
|---|---|
| private static final int WORD | |
| AsiExtraField | back to summary |
|---|---|
| public AsiExtraField() Constructor for AsiExtraField. | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| getCentralDirectoryData | back to summary |
|---|---|
| public byte[] getCentralDirectoryData() Implements org. Delegate to local file data.
| |
| getCentralDirectoryLength | back to summary |
|---|---|
| public ZipShort getCentralDirectoryLength() Implements org. Delegate to local file data.
| |
| getGroupId | back to summary |
|---|---|
| public int getGroupId() Get the group id.
| |
| getHeaderId | back to summary |
|---|---|
| public ZipShort getHeaderId() Implements org. The Header-ID.
| |
| getLinkedFile | back to summary |
|---|---|
| public String getLinkedFile() Name of linked file
| |
| getLocalFileDataData | back to summary |
|---|---|
| public byte[] getLocalFileDataData() Implements org. The actual data to put into local file data - without Header-ID or length specifier.
| |
| getLocalFileDataLength | back to summary |
|---|---|
| public ZipShort getLocalFileDataLength() Implements org. Length of the extra field in the local file data - without Header-ID or length specifier.
| |
| getMode | back to summary |
|---|---|
| public int getMode() File mode of this file.
| |
| getMode | back to summary |
|---|---|
| protected int getMode(int mode) Get the file mode for given permissions with the correct file type.
| |
| getUserId | back to summary |
|---|---|
| public int getUserId() Get the user id.
| |
| isDirectory | back to summary |
|---|---|
| public boolean isDirectory() Is this entry a directory?
| |
| isLink | back to summary |
|---|---|
| public boolean isLink() Is this entry a symbolic link?
| |
| parseFromLocalFileData | back to summary |
|---|---|
| public void parseFromLocalFileData(byte[] data, int offset, int length) throws ZipException Implements org. Populate data from this array as if it was in local file data.
| |
| setDirectory | back to summary |
|---|---|
| public void setDirectory(boolean dirFlag) Indicate whether this entry is a directory.
| |
| setGroupId | back to summary |
|---|---|
| public void setGroupId(int gid) Set the group id.
| |
| setLinkedFile | back to summary |
|---|---|
| public void setLinkedFile(String name) Indicate that this entry is a symbolic link to the given filename.
| |
| setMode | back to summary |
|---|---|
| public void setMode(int mode) File mode of this file.
| |
| setUserId | back to summary |
|---|---|
| public void setUserId(int uid) Set the user id.
| |