public class X7875_NewUnix extends java.lang.Object implements ZipExtraField, java.lang.Cloneable, java.io.Serializable
Local-header version:
Value Size Description
----- ---- -----------
0x7875 Short tag for this extra block type ("ux")
TSize Short total data size for this block
Version 1 byte version of this extra field, currently 1
UIDSize 1 byte Size of UID field
UID Variable UID for this entry (little endian)
GIDSize 1 byte Size of GID field
GID Variable GID for this entry (little endian)
Central-header version:
Value Size Description
----- ---- -----------
0x7855 Short tag for this extra block type ("Ux")
TSize Short total data size for this block (0)
| Modifier and Type | Field and Description |
|---|---|
private java.math.BigInteger |
gid |
private static ZipShort |
HEADER_ID |
private static java.math.BigInteger |
ONE_THOUSAND |
private static long |
serialVersionUID |
private java.math.BigInteger |
uid |
private int |
version |
private static ZipShort |
ZERO |
EXTRAFIELD_HEADER_SIZE| Constructor and Description |
|---|
X7875_NewUnix()
Constructor for X7875_NewUnix.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
byte[] |
getCentralDirectoryData()
The actual data to put into central directory data - without Header-ID
or length specifier.
|
ZipShort |
getCentralDirectoryLength()
Length of the extra field in the central directory data - without
Header-ID or length specifier.
|
long |
getGID()
Gets the GID as a long.
|
ZipShort |
getHeaderId()
The Header-ID.
|
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.
|
long |
getUID()
Gets the UID as a long.
|
int |
hashCode() |
void |
parseFromCentralDirectoryData(byte[] buffer,
int offset,
int length)
Doesn't do anything since this class doesn't store anything
inside the central directory.
|
void |
parseFromLocalFileData(byte[] data,
int offset,
int length)
Populate data from this array as if it was in local file data.
|
private void |
reset()
Reset state back to newly constructed state.
|
void |
setGID(long l)
Sets the GID.
|
void |
setUID(long l)
Sets the UID.
|
java.lang.String |
toString()
Returns a String representation of this class useful for
debugging purposes.
|
(package private) static byte[] |
trimLeadingZeroesForceMinLength(byte[] array)
Not really for external usage, but marked "package" visibility
to help us JUnit it.
|
private static final ZipShort HEADER_ID
private static final ZipShort ZERO
private static final java.math.BigInteger ONE_THOUSAND
private static final long serialVersionUID
private int version
private java.math.BigInteger uid
private java.math.BigInteger gid
public ZipShort getHeaderId()
getHeaderId in interface ZipExtraFieldpublic long getUID()
public long getGID()
public void setUID(long l)
l - UID value to set on this extra field.public void setGID(long l)
l - GID value to set on this extra field.public ZipShort getLocalFileDataLength()
getLocalFileDataLength in interface ZipExtraFieldZipShort for the length of the data of this extra fieldpublic ZipShort getCentralDirectoryLength()
getCentralDirectoryLength in interface ZipExtraFieldZipShort for the length of the data of this extra fieldpublic byte[] getLocalFileDataData()
getLocalFileDataData in interface ZipExtraFieldpublic byte[] getCentralDirectoryData()
getCentralDirectoryData in interface ZipExtraFieldpublic void parseFromLocalFileData(byte[] data,
int offset,
int length)
throws java.util.zip.ZipException
parseFromLocalFileData in interface ZipExtraFielddata - an array of bytesoffset - the start offsetlength - the number of bytes in the array from offsetjava.util.zip.ZipException - on errorpublic void parseFromCentralDirectoryData(byte[] buffer,
int offset,
int length)
throws java.util.zip.ZipException
parseFromCentralDirectoryData in interface ZipExtraFieldbuffer - the buffer to read data fromoffset - offset into buffer to read datalength - the length of datajava.util.zip.ZipException - on errorprivate void reset()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectstatic byte[] trimLeadingZeroesForceMinLength(byte[] array)
array - byte[] array to trim & pad.