See PKWARE's APPNOTE.TXT, section 4.5.3.
Currently Ant doesn't support encrypting the central directory so the note 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 | |
| private static final byte[] | |
| 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 Ant. |
| public | Zip64ExtendedInformationExtraField(ZipEightByteInteger
the entry's original size size, ZipEightByteInteger the entry's compressed size compressedSize)Creates an extra field based on the original and compressed size. |
| public | Zip64ExtendedInformationExtraField(ZipEightByteInteger
the entry's original size size, ZipEightByteInteger the entry's compressed size compressedSize, ZipEightByteInteger ZipEightByteInteger relativeHeaderOffset, ZipLong ZipLong 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 | |
| public ZipLong | |
| public ZipShort | |
| public byte[] | getLocalFileDataData()
Implements org. |
| public ZipShort | getLocalFileDataLength()
Implements org. |
| public ZipEightByteInteger | Returns: ZipEightByteIntegerThe relative header offset stored in this extra field. |
| public ZipEightByteInteger | |
| public void | parseFromCentralDirectoryData(byte[]
an array of bytes buffer, int the start offset offset, int the number of bytes in the array from offset length)Implements org. |
| public void | parseFromLocalFileData(byte[]
an array of bytes buffer, int the start offset offset, int the number of bytes in the array from offset length)Implements org. |
| public void | reparseCentralDirectoryData(boolean
boolean hasUncompressedSize, boolean boolean hasCompressedSize, boolean boolean hasRelativeHeaderOffset, boolean boolean hasDiskStart)Parses the raw bytes read from the central directory extra field with knowledge which fields are expected to be there. |
| public void | setCompressedSize(ZipEightByteInteger
ZipEightByteInteger compressedSize)The uncompressed size stored in this extra field. |
| public void | |
| public void | setRelativeHeaderOffset(ZipEightByteInteger
ZipEightByteInteger rho)The relative header offset stored in this extra field. |
| public void | setSize(ZipEightByteInteger
ZipEightByteInteger size)The uncompressed size stored in this extra field. |
| compressedSize | back to summary |
|---|---|
| private ZipEightByteInteger compressedSize | |
| diskStart | back to summary |
|---|---|
| private ZipLong diskStart | |
| EMPTY | back to summary |
|---|---|
| private static final byte[] EMPTY | |
| 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 Ant. | |
| Zip64ExtendedInformationExtraField | back to summary |
|---|---|
| public Zip64ExtendedInformationExtraField(ZipEightByteInteger size, ZipEightByteInteger compressedSize) Creates an extra field based on the original and compressed size.
| |
| Zip64ExtendedInformationExtraField | back to summary |
|---|---|
| public Zip64ExtendedInformationExtraField(ZipEightByteInteger size, ZipEightByteInteger compressedSize, ZipEightByteInteger relativeHeaderOffset, ZipLong diskStart) Creates an extra field based on all four possible values.
| |
| addSizes | back to summary |
|---|---|
| private int addSizes(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(byte[] buffer, int offset, 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(byte[] buffer, int offset, 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(boolean hasUncompressedSize, boolean hasCompressedSize, boolean hasRelativeHeaderOffset, 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(ZipEightByteInteger compressedSize) The uncompressed size stored in this extra field.
| |
| setDiskStartNumber | back to summary |
|---|---|
| public void setDiskStartNumber(ZipLong ds) The disk start number stored in this extra field.
| |
| setRelativeHeaderOffset | back to summary |
|---|---|
| public void setRelativeHeaderOffset(ZipEightByteInteger rho) The relative header offset stored in this extra field.
| |
| setSize | back to summary |
|---|---|
| public void setSize(ZipEightByteInteger size) The uncompressed size stored in this extra field.
| |