Package org.apache.tools.zip
Class UnparseableExtraFieldData
java.lang.Object
org.apache.tools.zip.UnparseableExtraFieldData
- All Implemented Interfaces:
- CentralDirectoryParsingZipExtraField,- ZipExtraField
public final class UnparseableExtraFieldData
extends Object
implements CentralDirectoryParsingZipExtraField
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:
- Ant 1.8.1
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.voidparseFromCentralDirectoryData(byte[] buffer, int offset, int length) Populate data from this array as if it was in central directory data.voidparseFromLocalFileData(byte[] buffer, int offset, int length) Populate data from this array as if it was in local file data.
- 
Constructor Details- 
UnparseableExtraFieldDatapublic UnparseableExtraFieldData()
 
- 
- 
Method Details- 
getHeaderIdThe Header-ID.- Specified by:
- getHeaderIdin interface- ZipExtraField
- Returns:
- a completely arbitrary value that should be ignored.
 
- 
getLocalFileDataLengthLength of the complete extra field in the local file data.- Specified by:
- getLocalFileDataLengthin interface- ZipExtraField
- Returns:
- The LocalFileDataLength value
 
- 
getCentralDirectoryLengthLength of the complete extra field in the central directory.- Specified by:
- getCentralDirectoryLengthin interface- ZipExtraField
- Returns:
- The CentralDirectoryLength value
 
- 
getLocalFileDataDatapublic byte[] getLocalFileDataData()The actual data to put into local file data.- Specified by:
- getLocalFileDataDatain interface- ZipExtraField
- Returns:
- The LocalFileDataData value
 
- 
getCentralDirectoryDatapublic byte[] getCentralDirectoryData()The actual data to put into central directory.- Specified by:
- getCentralDirectoryDatain interface- ZipExtraField
- Returns:
- The CentralDirectoryData value
 
- 
parseFromLocalFileDatapublic void parseFromLocalFileData(byte[] buffer, int offset, int length) Populate data from this array as if it was in local file data.- Specified by:
- parseFromLocalFileDatain interface- ZipExtraField
- Parameters:
- buffer- the buffer to read data from
- offset- offset into buffer to read data
- length- the length of data
 
- 
parseFromCentralDirectoryDatapublic void parseFromCentralDirectoryData(byte[] buffer, int offset, int length) Populate data from this array as if it was in central directory data.- Specified by:
- parseFromCentralDirectoryDatain interface- CentralDirectoryParsingZipExtraField
- Parameters:
- buffer- the buffer to read data from
- offset- offset into buffer to read data
- length- the length of data
 
 
-