|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.compress.archivers.zip.X7875_NewUnix
public class X7875_NewUnix
An extra field that stores UNIX UID/GID data (owner & group ownership) for a given zip entry. We're using the field definition given in Info-Zip's source archive: zip-3.0.tar.gz/proginfo/extrafld.txt
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)
| Constructor Summary | |
|---|---|
X7875_NewUnix()
Constructor for X7875_NewUnix. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
boolean |
equals(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 special since this class always uses the same data in central directory and local file data. |
void |
parseFromLocalFileData(byte[] data,
int offset,
int length)
Populate data from this array as if it was in local file data. |
void |
setGID(long l)
Sets the GID. |
void |
setUID(long l)
Sets the UID. |
String |
toString()
Returns a String representation of this class useful for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public X7875_NewUnix()
| Method Detail |
|---|
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 ZipExtraField
public void parseFromLocalFileData(byte[] data,
int offset,
int length)
throws ZipException
parseFromLocalFileData in interface ZipExtraFielddata - an array of bytesoffset - the start offsetlength - the number of bytes in the array from offset
ZipException - on error
public void parseFromCentralDirectoryData(byte[] buffer,
int offset,
int length)
throws ZipException
parseFromCentralDirectoryData in interface ZipExtraFieldbuffer - the buffer to read data fromoffset - offset into buffer to read datalength - the length of data
ZipException - on errorpublic String toString()
toString in class Object
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||