Class UnparseableExtraFieldData
java.lang.Object
org.apache.commons.compress.archivers.zip.UnparseableExtraFieldData
- All Implemented Interfaces:
ZipExtraField
Wrapper for extra field data that doesn't conform to the recommended format of header-tag + size + data.
The header-id is artificial (and not listed as a known ID in APPNOTE.TXT). Since it isn't used anywhere except to satisfy the ZipExtraField contract it shouldn't matter anyway.
- Since:
- 1.1
- This class is not thread-safe
-
Field Summary
Fields inherited from interface org.apache.commons.compress.archivers.zip.ZipExtraField
EXTRAFIELD_HEADER_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
The actual data to put into central directory.Length of the complete extra field in the central directory.The Header-ID.byte[]
The actual data to put into local file data.Length of the complete extra field in the local file data.void
parseFromCentralDirectoryData
(byte[] buffer, int offset, int length) Populate data from this array as if it was in central directory data.void
parseFromLocalFileData
(byte[] buffer, int offset, int length) Populate data from this array as if it was in local file data.
-
Constructor Details
-
UnparseableExtraFieldData
public UnparseableExtraFieldData()
-
-
Method Details
-
getCentralDirectoryData
The actual data to put into central directory.- Specified by:
getCentralDirectoryData
in interfaceZipExtraField
- Returns:
- The CentralDirectoryData value
-
getCentralDirectoryLength
Length of the complete extra field in the central directory.- Specified by:
getCentralDirectoryLength
in interfaceZipExtraField
- Returns:
- The CentralDirectoryLength value
-
getHeaderId
The Header-ID.- Specified by:
getHeaderId
in interfaceZipExtraField
- Returns:
- a completely arbitrary value that should be ignored.
-
getLocalFileDataData
The actual data to put into local file data.- Specified by:
getLocalFileDataData
in interfaceZipExtraField
- Returns:
- The LocalFileDataData value
-
getLocalFileDataLength
Length of the complete extra field in the local file data.- Specified by:
getLocalFileDataLength
in interfaceZipExtraField
- Returns:
- The LocalFileDataLength value
-
parseFromCentralDirectoryData
Populate data from this array as if it was in central directory data.- Specified by:
parseFromCentralDirectoryData
in interfaceZipExtraField
- Parameters:
buffer
- the buffer to read data fromoffset
- offset into buffer to read datalength
- the length of data
-
parseFromLocalFileData
Populate data from this array as if it was in local file data.- Specified by:
parseFromLocalFileData
in interfaceZipExtraField
- Parameters:
buffer
- the buffer to read data fromoffset
- offset into buffer to read datalength
- the length of data
-