Currently Commons Compress doesn't support encrypting the central directory so the note in APPNOTE.TXT about masking doesn't apply.
The implementation relies on data being read from the local file header and assumes that both size values are always present.
| Modifier and Type | Field and Description |
|---|---|
| private ZipEightByteInteger | |
| private ZipLong | |
| pack-priv static final ZipShort | |
| private static final String | |
| private byte[] | rawCentralDirectoryData
Stored in |
| private ZipEightByteInteger | |
| private ZipEightByteInteger |
| Access | Constructor and Description |
|---|---|
| public | Zip64ExtendedInformationExtraField()
This constructor should only be used by the code that reads archives inside of Commons Compress. |
| public | Zip64ExtendedInformationExtraField(final ZipEightByteInteger
the entry's original size size, final ZipEightByteInteger the entry's compressed size compressedSize)Creates an extra field based on the original and compressed size. |
| public | Zip64ExtendedInformationExtraField(final ZipEightByteInteger
the entry's original size size, final ZipEightByteInteger the entry's compressed size compressedSize, final ZipEightByteInteger the entry's offset relativeHeaderOffset, final ZipLong the disk start diskStart)Creates an extra field based on all four possible values. |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public byte[] | getCentralDirectoryData()
Implements org. |
| public ZipShort | getCentralDirectoryLength()
Implements org. |
| public ZipEightByteInteger | Returns: The compressed size stored in this extra field.The compressed size stored in this extra field. |
| public ZipLong | Returns: The disk start number stored in this extra field.The disk start number stored in this extra field. |
| public ZipShort | getHeaderId()
Implements org. |
| public byte[] | getLocalFileDataData()
Implements org. |
| public ZipShort | getLocalFileDataLength()
Implements org. |
| public ZipEightByteInteger | Returns: The relative header offset stored in this extra field.The relative header offset stored in this extra field. |
| public ZipEightByteInteger | Returns: The uncompressed size stored in this extra field.The uncompressed size stored in this extra field. |
| public void | parseFromCentralDirectoryData(final byte[]
the buffer to read data from buffer, int offset into buffer to read data offset, final int the length of data length)Implements org. |
| public void | parseFromLocalFileData(final byte[]
the buffer to read data from buffer, int offset into buffer to read data offset, final int the length of data length)Implements org. |
| public void | reparseCentralDirectoryData(final boolean
flag to read from central directory hasUncompressedSize, final boolean flag to read from central directory hasCompressedSize, final boolean flag to read from central directory hasRelativeHeaderOffset, final boolean flag to read from central directory hasDiskStart)Parses the raw bytes read from the central directory extra field with knowledge which fields are expected to be there. |
| public void | setCompressedSize(final ZipEightByteInteger
The uncompressed size stored in this extra field. compressedSize)The uncompressed size stored in this extra field. |
| public void | setDiskStartNumber(final ZipLong
The disk start number stored in this extra field. ds)The disk start number stored in this extra field. |
| public void | setRelativeHeaderOffset(final ZipEightByteInteger
The relative header offset stored in this extra field. rho)The relative header offset stored in this extra field. |
| public void | setSize(final ZipEightByteInteger
The uncompressed size stored in this extra field. size)The uncompressed size stored in this extra field. |
| compressedSize | back to summary |
|---|---|
| private ZipEightByteInteger compressedSize | |
| diskStart | back to summary |
|---|---|
| private ZipLong diskStart | |
| HEADER_ID | back to summary |
|---|---|
| pack-priv static final ZipShort HEADER_ID | |
| LFH_MUST_HAVE_BOTH_SIZES_MSG | back to summary |
|---|---|
| private static final String LFH_MUST_HAVE_BOTH_SIZES_MSG | |
| rawCentralDirectoryData | back to summary |
|---|---|
| private byte[] rawCentralDirectoryData Stored in Not used for anything else
| |
| relativeHeaderOffset | back to summary |
|---|---|
| private ZipEightByteInteger relativeHeaderOffset | |
| size | back to summary |
|---|---|
| private ZipEightByteInteger size | |
| Zip64ExtendedInformationExtraField | back to summary |
|---|---|
| public Zip64ExtendedInformationExtraField() This constructor should only be used by the code that reads archives inside of Commons Compress. | |
| Zip64ExtendedInformationExtraField | back to summary |
|---|---|
| public Zip64ExtendedInformationExtraField(final ZipEightByteInteger size, final ZipEightByteInteger compressedSize) Creates an extra field based on the original and compressed size.
| |
| Zip64ExtendedInformationExtraField | back to summary |
|---|---|
| public Zip64ExtendedInformationExtraField(final ZipEightByteInteger size, final ZipEightByteInteger compressedSize, final ZipEightByteInteger relativeHeaderOffset, final ZipLong diskStart) Creates an extra field based on all four possible values.
| |
| addSizes | back to summary |
|---|---|
| private int addSizes(final byte[] data) | |
| getCentralDirectoryData | back to summary |
|---|---|
| public byte[] getCentralDirectoryData() Implements org. Doc from org. The actual data to put into central directory - without Header-ID or length specifier.
| |
| getCentralDirectoryLength | back to summary |
|---|---|
| public ZipShort getCentralDirectoryLength() Implements org. Doc from org. Length of the extra field in the central directory - without Header-ID or length specifier. | |
| getCompressedSize | back to summary |
|---|---|
| public ZipEightByteInteger getCompressedSize() The compressed size stored in this extra field.
| |
| getDiskStartNumber | back to summary |
|---|---|
| public ZipLong getDiskStartNumber() The disk start number stored in this extra field.
| |
| getHeaderId | back to summary |
|---|---|
| public ZipShort getHeaderId() Implements org. Doc from org. The Header-ID. | |
| getLocalFileDataData | back to summary |
|---|---|
| public byte[] getLocalFileDataData() Implements org. Doc from org. The actual data to put into local file data - without Header-ID or length specifier.
| |
| getLocalFileDataLength | back to summary |
|---|---|
| public ZipShort getLocalFileDataLength() Implements org. Doc from org. Length of the extra field in the local file data - without Header-ID or length specifier. | |
| getRelativeHeaderOffset | back to summary |
|---|---|
| public ZipEightByteInteger getRelativeHeaderOffset() The relative header offset stored in this extra field.
| |
| getSize | back to summary |
|---|---|
| public ZipEightByteInteger getSize() The uncompressed size stored in this extra field.
| |
| parseFromCentralDirectoryData | back to summary |
|---|---|
| public void parseFromCentralDirectoryData(final byte[] buffer, int offset, final int length) throws ZipException Implements org. Doc from org. Populate data from this array as if it was in central directory data.
| |
| parseFromLocalFileData | back to summary |
|---|---|
| public void parseFromLocalFileData(final byte[] buffer, int offset, final int length) throws ZipException Implements org. Doc from org. Populate data from this array as if it was in local file data.
| |
| reparseCentralDirectoryData | back to summary |
|---|---|
| public void reparseCentralDirectoryData(final boolean hasUncompressedSize, final boolean hasCompressedSize, final boolean hasRelativeHeaderOffset, final boolean hasDiskStart) throws ZipException Parses the raw bytes read from the central directory extra field with knowledge which fields are expected to be there. All four fields inside the zip64 extended information extra field are optional and must only be present if their corresponding entry inside the central directory contains the correct magic value.
| |
| setCompressedSize | back to summary |
|---|---|
| public void setCompressedSize(final ZipEightByteInteger compressedSize) The uncompressed size stored in this extra field.
| |
| setDiskStartNumber | back to summary |
|---|---|
| public void setDiskStartNumber(final ZipLong ds) The disk start number stored in this extra field.
| |
| setRelativeHeaderOffset | back to summary |
|---|---|
| public void setRelativeHeaderOffset(final ZipEightByteInteger rho) The relative header offset stored in this extra field.
| |
| setSize | back to summary |
|---|---|
| public void setSize(final ZipEightByteInteger size) The uncompressed size stored in this extra field.
| |