类 UnparseableExtraFieldData
java.lang.Object
com.sh.common.zip.UnparseableExtraFieldData
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 know ID in
the .ZIP File Format Specification).
Since it isn't used anywhere except to satisfy the
ZipExtraField contract it shouldn't matter anyway.ZIP File Format Specification
- 从以下版本开始:
- Ant 1.8.1
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明byte[]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.
-
构造器详细资料
-
UnparseableExtraFieldData
public UnparseableExtraFieldData()
-
-
方法详细资料
-
getHeaderId
The Header-ID.- 指定者:
getHeaderId在接口中ZipExtraField- 返回:
- a completely arbitrary value that should be ignored.
-
getLocalFileDataLength
Length of the complete extra field in the local file data.- 指定者:
getLocalFileDataLength在接口中ZipExtraField- 返回:
- The LocalFileDataLength value
-
getCentralDirectoryLength
Length of the complete extra field in the central directory.- 指定者:
getCentralDirectoryLength在接口中ZipExtraField- 返回:
- The CentralDirectoryLength value
-
getLocalFileDataData
public byte[] getLocalFileDataData()The actual data to put into local file data.- 指定者:
getLocalFileDataData在接口中ZipExtraField- 返回:
- The LocalFileDataData value
-
getCentralDirectoryData
public byte[] getCentralDirectoryData()The actual data to put into central directory.- 指定者:
getCentralDirectoryData在接口中ZipExtraField- 返回:
- The CentralDirectoryData value
-
parseFromLocalFileData
public void parseFromLocalFileData(byte[] buffer, int offset, int length) Populate data from this array as if it was in local file data.- 指定者:
parseFromLocalFileData在接口中ZipExtraField- 参数:
buffer- the buffer to read data fromoffset- offset into buffer to read datalength- the length of data
-
parseFromCentralDirectoryData
public void parseFromCentralDirectoryData(byte[] buffer, int offset, int length) Populate data from this array as if it was in central directory data.- 指定者:
parseFromCentralDirectoryData在接口中CentralDirectoryParsingZipExtraField- 参数:
buffer- the buffer to read data fromoffset- offset into buffer to read datalength- the length of data
-