Package org.apache.tools.zip
Interface ZipExtraField
- 
- All Known Subinterfaces:
- CentralDirectoryParsingZipExtraField
 - All Known Implementing Classes:
- AbstractUnicodeExtraField,- AsiExtraField,- JarMarker,- UnicodeCommentExtraField,- UnicodePathExtraField,- UnparseableExtraFieldData,- UnrecognizedExtraField,- Zip64ExtendedInformationExtraField
 
 public interface ZipExtraFieldGeneral format of extra field data.Extra fields usually appear twice per file, once in the local file data and once in the central directory. Usually they are the same, but they don't have to be. java.util.zip.ZipOutputStreamwill only use the local file data in both places.
- 
- 
Method SummaryModifier and Type Method Description byte[]getCentralDirectoryData()The actual data to put into central directory - without Header-ID or length specifier.ZipShortgetCentralDirectoryLength()Length of the extra field in the central directory - without Header-ID or length specifier.ZipShortgetHeaderId()The Header-ID.byte[]getLocalFileDataData()The actual data to put into local file data - without Header-ID or length specifier.ZipShortgetLocalFileDataLength()Length of the extra field in the local file data - without Header-ID or length specifier.voidparseFromLocalFileData(byte[] data, int offset, int length)Populate data from this array as if it was in local file data.
 
- 
- 
- 
Method Detail- 
getHeaderIdZipShort getHeaderId() The Header-ID.- Returns:
- the header id
- Since:
- 1.1
 
 - 
getLocalFileDataLengthZipShort getLocalFileDataLength() Length of the extra field in the local file data - without Header-ID or length specifier.- Returns:
- the length of the field in the local file data
- Since:
- 1.1
 
 - 
getCentralDirectoryLengthZipShort getCentralDirectoryLength() Length of the extra field in the central directory - without Header-ID or length specifier.- Returns:
- the length of the field in the central directory
- Since:
- 1.1
 
 - 
getLocalFileDataDatabyte[] getLocalFileDataData() The actual data to put into local file data - without Header-ID or length specifier.- Returns:
- the data
- Since:
- 1.1
 
 - 
getCentralDirectoryDatabyte[] getCentralDirectoryData() The actual data to put into central directory - without Header-ID or length specifier.- Returns:
- the data
- Since:
- 1.1
 
 - 
parseFromLocalFileDatavoid parseFromLocalFileData(byte[] data, int offset, int length) throws java.util.zip.ZipExceptionPopulate data from this array as if it was in local file data.- Parameters:
- data- an array of bytes
- offset- the start offset
- length- the number of bytes in the array from offset
- Throws:
- java.util.zip.ZipException- on error
- Since:
- 1.1
 
 
- 
 
-