public class AsiExtraField extends java.lang.Object implements ZipExtraField, UnixStat, java.lang.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 filename
Short is two bytes and Long is four bytes in big endian byte and word order, device numbers are currently not supported.
DEFAULT_DIR_PERM, DEFAULT_FILE_PERM, DEFAULT_LINK_PERM, DIR_FLAG, FILE_FLAG, LINK_FLAG, PERM_MASK
构造器和说明 |
---|
AsiExtraField()
Constructor for AsiExtraField.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
clone() |
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.
|
java.lang.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.
|
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(java.lang.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.
|
public ZipShort getHeaderId()
getHeaderId
在接口中 ZipExtraField
public ZipShort getLocalFileDataLength()
getLocalFileDataLength
在接口中 ZipExtraField
ZipShort
for the length of the data of this extra fieldpublic ZipShort getCentralDirectoryLength()
getCentralDirectoryLength
在接口中 ZipExtraField
public byte[] getLocalFileDataData()
getLocalFileDataData
在接口中 ZipExtraField
public byte[] getCentralDirectoryData()
getCentralDirectoryData
在接口中 ZipExtraField
public void setUserId(int uid)
uid
- the user idpublic int getUserId()
public void setGroupId(int gid)
gid
- the group idpublic int getGroupId()
public void setLinkedFile(java.lang.String name)
name
- Name of the file this entry links to, empty String
if it is not a symbolic link.public java.lang.String getLinkedFile()
public boolean isLink()
public void setMode(int mode)
mode
- the file modepublic int getMode()
public void setDirectory(boolean dirFlag)
dirFlag
- if true, this entry is a directorypublic boolean isDirectory()
public void parseFromLocalFileData(byte[] data, int offset, int length) throws java.util.zip.ZipException
parseFromLocalFileData
在接口中 ZipExtraField
data
- an array of bytesoffset
- the start offsetlength
- the number of bytes in the array from offsetjava.util.zip.ZipException
- on errorpublic java.lang.Object clone()
clone
在类中 java.lang.Object