org.apache.tools.zip
public class AsiExtraField extends Object implements ZipExtraField, UnixStat, Cloneable
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 filenametaken 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.
Constructor Summary | |
---|---|
AsiExtraField() Constructor for AsiExtraField. |
Method Summary | |
---|---|
byte[] | getCentralDirectoryData()
Delegate to local file data. |
ZipShort | getCentralDirectoryLength()
Delegate to local file data. |
int | getGroupId()
Get the group id. |
ZipShort | getHeaderId()
The Header-ID. |
String | getLinkedFile()
Name of linked file
|
byte[] | getLocalFileDataData()
The actual data to put into local file data - without Header-ID
or length specifier. |
ZipShort | getLocalFileDataLength()
Length of the extra field in the local file data - without
Header-ID or length specifier. |
int | getMode()
File mode of this file. |
protected int | getMode(int mode)
Get the file mode for given permissions with the correct file type. |
int | getUserId()
Get the user id. |
boolean | isDirectory()
Is this entry a directory? |
boolean | isLink()
Is this entry a symbolic link? |
void | parseFromLocalFileData(byte[] data, int offset, int length)
Populate data from this array as if it was in local file data. |
void | setDirectory(boolean dirFlag)
Indicate whether this entry is a directory. |
void | setGroupId(int gid)
Set the group id. |
void | setLinkedFile(String name)
Indicate that this entry is a symbolic link to the given filename.
|
void | setMode(int mode)
File mode of this file. |
void | setUserId(int uid)
Set the user id. |
Returns: the local file data
Since: 1.1
Returns: the centralDirectory length
Since: 1.1
Returns: the group id
Since: 1.1
Returns: the value for the header id for this extrafield
Since: 1.1
Returns: name of the file this entry links to if it is a symbolic link, the empty string otherwise.
Since: 1.1
Returns: get the data
Since: 1.1
Returns: a ZipShort
for the length of the data of this extra field
Since: 1.1
Returns: the file mode
Since: 1.1
Parameters: mode the mode
Returns: the type with the mode
Since: 1.1
Returns: the user id
Since: 1.1
Returns: true if this entry is a directory
Since: 1.1
Returns: true if this is a symbolic link
Since: 1.1
Parameters: data an array of bytes offset the start offset length the number of bytes in the array from offset
Throws: ZipException on error
Since: 1.1
Parameters: dirFlag if true, this entry is a directory
Since: 1.1
Parameters: gid the group id
Since: 1.1
Parameters: name Name of the file this entry links to, empty String if it is not a symbolic link.
Since: 1.1
Parameters: mode the file mode
Since: 1.1
Parameters: uid the user id
Since: 1.1