The padding content of the padding is ignored and not retained when reading a padding field.
This enables Commons Compress to create "aligned" archives similar to Android's zipalign command line tool.
ZipArchiveEntry#setAlignment
| Modifier and Type | Field and Description |
|---|---|
| private short | |
| private static final int | |
| private boolean | |
| public static final int | |
| public static final ZipShort | ID
Extra field id used for storing alignment and padding. |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | ResourceAlignmentExtraField(final int alignment, final boolean allowMethodChange, final int padding)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if method change is allowed, false otherwise.Indicates whether method change is allowed when re-compressing the ZIP file. |
| public short | |
| public byte[] | getCentralDirectoryData()
Implements org. |
| public ZipShort | getCentralDirectoryLength()
Implements org. |
| public ZipShort | getHeaderId()
Implements org. |
| public byte[] | getLocalFileDataData()
Implements org. |
| public ZipShort | getLocalFileDataLength()
Implements org. |
| public void | parseFromCentralDirectoryData(final byte[]
the buffer to read data from buffer, final 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, final int offset into buffer to read data offset, final int the length of data length)Implements org. |
| alignment | back to summary |
|---|---|
| private short alignment | |
| ALLOW_METHOD_MESSAGE_CHANGE_FLAG | back to summary |
|---|---|
| private static final int ALLOW_METHOD_MESSAGE_CHANGE_FLAG | |
| allowMethodChange | back to summary |
|---|---|
| private boolean allowMethodChange | |
| BASE_SIZE | back to summary |
|---|---|
| public static final int BASE_SIZE | |
| ID | back to summary |
|---|---|
| public static final ZipShort ID Extra field id used for storing alignment and padding. | |
| padding | back to summary |
|---|---|
| private int padding | |
| ResourceAlignmentExtraField | back to summary |
|---|---|
| public ResourceAlignmentExtraField() | |
| ResourceAlignmentExtraField | back to summary |
|---|---|
| public ResourceAlignmentExtraField(final int alignment) | |
| ResourceAlignmentExtraField | back to summary |
|---|---|
| public ResourceAlignmentExtraField(final int alignment, final boolean allowMethodChange) | |
| ResourceAlignmentExtraField | back to summary |
|---|---|
| public ResourceAlignmentExtraField(final int alignment, final boolean allowMethodChange, final int padding) | |
| allowMethodChange | back to summary |
|---|---|
| public boolean allowMethodChange() Indicates whether method change is allowed when re-compressing the ZIP file.
| |
| getAlignment | back to summary |
|---|---|
| public short getAlignment() Gets requested alignment.
| |
| 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. | |
| 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. | |
| parseFromCentralDirectoryData | back to summary |
|---|---|
| public void parseFromCentralDirectoryData(final byte[] buffer, final 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, final 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.
| |