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. will only use the local file data in both places.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | EXTRAFIELD_HEADER_SIZE
Size of an extra field header (id + length). |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | Returns: the dataThe actual data to put into central directory - without Header-ID or length specifier. |
| public ZipShort | Returns: the length of the field in the central directoryLength of the extra field in the central directory - without Header-ID or length specifier. |
| public ZipShort | |
| public byte[] | Returns: the dataThe actual data to put into local file data - without Header-ID or length specifier. |
| public ZipShort | Returns: the length of the field in the local file dataLength of the extra field in the local file data - without Header-ID or length specifier. |
| public void | parseFromCentralDirectoryData(byte[]
the buffer to read data from buffer, int offset into buffer to read data offset, int the length of data length)Populate data from this array as if it was in central directory data. |
| public void | parseFromLocalFileData(byte[]
the buffer to read data from buffer, int offset into buffer to read data offset, int the length of data length)Populate data from this array as if it was in local file data. |
| EXTRAFIELD_HEADER_SIZE | back to summary |
|---|---|
| public static final int EXTRAFIELD_HEADER_SIZE Size of an extra field header (id + length).
| |
| getCentralDirectoryData | back to summary |
|---|---|
| public byte[] getCentralDirectoryData() The actual data to put into central directory - without Header-ID or length specifier.
| |
| getCentralDirectoryLength | back to summary |
|---|---|
| public ZipShort getCentralDirectoryLength() Length of the extra field in the central directory - without Header-ID or length specifier.
| |
| getHeaderId | back to summary |
|---|---|
| public ZipShort getHeaderId() The Header-ID.
| |
| getLocalFileDataData | back to summary |
|---|---|
| public byte[] getLocalFileDataData() The actual data to put into local file data - without Header-ID or length specifier.
| |
| getLocalFileDataLength | back to summary |
|---|---|
| public ZipShort getLocalFileDataLength() Length of the extra field in the local file data - without Header-ID or length specifier.
| |
| parseFromCentralDirectoryData | back to summary |
|---|---|
| public void parseFromCentralDirectoryData(byte[] buffer, int offset, int length) throws ZipException Populate data from this array as if it was in central directory data.
| |
| parseFromLocalFileData | back to summary |
|---|---|
| public void parseFromLocalFileData(byte[] buffer, int offset, int length) throws ZipException Populate data from this array as if it was in local file data.
| |