|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.compress.archivers.zip.JarMarker
public final class JarMarker
If this extra field is added as the very first extra field of the archive, Solaris will consider it an executable jar file.
Constructor Summary | |
---|---|
JarMarker()
No-arg constructor |
Method Summary | |
---|---|
byte[] |
getCentralDirectoryData()
The actual data to put central directory - without Header-ID or length specifier. |
ZipShort |
getCentralDirectoryLength()
Length of the extra field in the central directory - without Header-ID or length specifier. |
ZipShort |
getHeaderId()
The Header-ID. |
static JarMarker |
getInstance()
Since JarMarker is stateless we can always use the same instance. |
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JarMarker()
Method Detail |
---|
public static JarMarker getInstance()
public ZipShort getHeaderId()
getHeaderId
in interface ZipExtraField
public ZipShort getLocalFileDataLength()
getLocalFileDataLength
in interface ZipExtraField
public ZipShort getCentralDirectoryLength()
getCentralDirectoryLength
in interface ZipExtraField
public byte[] getLocalFileDataData()
getLocalFileDataData
in interface ZipExtraField
public byte[] getCentralDirectoryData()
getCentralDirectoryData
in interface ZipExtraField
public void parseFromLocalFileData(byte[] data, int offset, int length) throws ZipException
parseFromLocalFileData
in interface ZipExtraField
data
- an array of bytesoffset
- the start offsetlength
- the number of bytes in the array from offset
ZipException
- on errorpublic void parseFromCentralDirectoryData(byte[] buffer, int offset, int length) throws ZipException
parseFromCentralDirectoryData
in interface ZipExtraField
buffer
- the buffer to read data fromoffset
- offset into buffer to read datalength
- the length of data
ZipException
- on error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |