org.apache.tools.zip
Interface ZipExtraField
- AsiExtraField, JarMarker, UnrecognizedExtraField
public interface ZipExtraField
General format of extra field data.
Extra fields usually appear twice per file, once in the local
file data and once in the central directory. Usually they are the
same, but they don't have to be.
java.util.zip.ZipOutputStream
will
only use the local file data in both places.
getCentralDirectoryData
public byte[] getCentralDirectoryData()
The actual data to put central directory - without Header-ID or
length specifier.
getCentralDirectoryLength
public ZipShort getCentralDirectoryLength()
Length of the extra field in the central directory - without
Header-ID or length specifier.
- the length of the field in the central directory
getHeaderId
public ZipShort getHeaderId()
The Header-ID.
getLocalFileDataData
public byte[] getLocalFileDataData()
The actual data to put into local file data - without Header-ID
or length specifier.
getLocalFileDataLength
public ZipShort getLocalFileDataLength()
Length of the extra field in the local file data - without
Header-ID or length specifier.
- the length of the field in the local file data
parseFromLocalFileData
public void parseFromLocalFileData(byte[] data,
int offset,
int length)
throws ZipException
Populate data from this array as if it was in local file data.
data
- an array of bytesoffset
- the start offsetlength
- the number of bytes in the array from offset