public abstract class PKWareExtraHeader extends java.lang.Object implements ZipExtraField
This base class acts as a marker so you know you can ignore all extra fields that extend this class if you are not interested in the meta data of PKWare strong encryption.
Algorithm IDs - integer identifier of the encryption algorithm from the following range| Modifier and Type | Class and Description |
|---|---|
static class |
PKWareExtraHeader.EncryptionAlgorithm
Encryption algorithm.
|
static class |
PKWareExtraHeader.HashAlgorithm
Hash Algorithm
|
EXTRAFIELD_HEADER_SIZE| Modifier and Type | Method and Description |
|---|---|
byte[] |
getCentralDirectoryData()
Gets the central data.
|
ZipShort |
getCentralDirectoryLength()
Gets the central data length.
|
ZipShort |
getHeaderId()
Gets the header id.
|
byte[] |
getLocalFileDataData()
Gets the local data.
|
ZipShort |
getLocalFileDataLength()
Gets the length of the local data.
|
void |
parseFromCentralDirectoryData(byte[] data,
int offset,
int length)
Populate data from this array as if it was in central directory data.
|
void |
parseFromLocalFileData(byte[] data,
int offset,
int length)
Populate data from this array as if it was in local file data.
|
void |
setCentralDirectoryData(byte[] data)
Sets the extra field data in central directory.
|
void |
setLocalFileDataData(byte[] data)
Sets the extra field data in the local file data - without Header-ID or length specifier.
|
public byte[] getCentralDirectoryData()
getCentralDirectoryData in interface ZipExtraFieldpublic ZipShort getCentralDirectoryLength()
getCentralDirectoryLength in interface ZipExtraFieldpublic ZipShort getHeaderId()
getHeaderId in interface ZipExtraFieldpublic byte[] getLocalFileDataData()
getLocalFileDataData in interface ZipExtraFieldpublic ZipShort getLocalFileDataLength()
getLocalFileDataLength in interface ZipExtraFieldpublic void parseFromCentralDirectoryData(byte[] data,
int offset,
int length)
throws java.util.zip.ZipException
ZipExtraFieldparseFromCentralDirectoryData in interface ZipExtraFielddata - the array of bytes.offset - the source location in the data array.length - the number of bytes to use in the data array.java.util.zip.ZipException - on errorZipExtraField.parseFromCentralDirectoryData(byte[], int, int)public void parseFromLocalFileData(byte[] data,
int offset,
int length)
throws java.util.zip.ZipException
ZipExtraFieldparseFromLocalFileData in interface ZipExtraFielddata - the array of bytes.offset - the source location in the data array.length - the number of bytes to use in the data array.java.util.zip.ZipException - on errorZipExtraField.parseFromLocalFileData(byte[], int, int)public void setCentralDirectoryData(byte[] data)
data - the data to usepublic void setLocalFileDataData(byte[] data)
data - the field data to useCopyright © 2010 - 2024 Adobe. All Rights Reserved