public interface ZipExtraField
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.
Modifier and Type | Field and Description |
---|---|
static int |
EXTRAFIELD_HEADER_SIZE
Size of an extra field field header (id + length).
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getCentralDirectoryData()
The actual data to put into 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.
|
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)
Populate data from this array as if it was in central directory data.
|
void |
parseFromLocalFileData(byte[] buffer,
int offset,
int length)
Populate data from this array as if it was in local file data.
|
static final int EXTRAFIELD_HEADER_SIZE
ZipShort getHeaderId()
ZipShort getLocalFileDataLength()
ZipShort getCentralDirectoryLength()
byte[] getLocalFileDataData()
byte[] getCentralDirectoryData()
void parseFromLocalFileData(byte[] buffer, int offset, int length) throws java.util.zip.ZipException
buffer
- the buffer to read data fromoffset
- offset into buffer to read datalength
- the length of datajava.util.zip.ZipException
- on errorvoid parseFromCentralDirectoryData(byte[] buffer, int offset, int length) throws java.util.zip.ZipException
buffer
- the buffer to read data fromoffset
- offset into buffer to read datalength
- the length of datajava.util.zip.ZipException
- on errorCopyright © 2010 - 2020 Adobe. All Rights Reserved