类 UnrecognizedExtraField
java.lang.Object
com.sh.common.zip.UnrecognizedExtraField
Simple placeholder for all those extra fields we don't want to deal
with.
Assumes local file data and central directory entries are identical - unless told the opposite.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明byte[]Get the central data.Get the central data length.Get the header id.byte[]Get the local data.Get the length of the local data.voidparseFromCentralDirectoryData(byte[] data, int offset, int length) Populate data from this array as if it was in central directory data.voidparseFromLocalFileData(byte[] data, int offset, int length) Populate data from this array as if it was in local file data.voidsetCentralDirectoryData(byte[] data) Set the extra field data in central directory.voidsetHeaderId(ZipShort headerId) Set the header id.voidsetLocalFileDataData(byte[] data) Set the extra field data in the local file data - without Header-ID or length specifier.
-
构造器详细资料
-
UnrecognizedExtraField
public UnrecognizedExtraField()
-
-
方法详细资料
-
setHeaderId
Set the header id.- 参数:
headerId- the header id to use
-
getHeaderId
Get the header id.- 指定者:
getHeaderId在接口中ZipExtraField- 返回:
- the header id
-
setLocalFileDataData
public void setLocalFileDataData(byte[] data) Set the extra field data in the local file data - without Header-ID or length specifier.- 参数:
data- the field data to use
-
getLocalFileDataLength
Get the length of the local data.- 指定者:
getLocalFileDataLength在接口中ZipExtraField- 返回:
- the length of the local data
-
getLocalFileDataData
public byte[] getLocalFileDataData()Get the local data.- 指定者:
getLocalFileDataData在接口中ZipExtraField- 返回:
- the local data
-
setCentralDirectoryData
public void setCentralDirectoryData(byte[] data) Set the extra field data in central directory.- 参数:
data- the data to use
-
getCentralDirectoryLength
Get the central data length. If there is no central data, get the local file data length.- 指定者:
getCentralDirectoryLength在接口中ZipExtraField- 返回:
- the central data length
-
getCentralDirectoryData
public byte[] getCentralDirectoryData()Get the central data.- 指定者:
getCentralDirectoryData在接口中ZipExtraField- 返回:
- the central data if present, else return the local file data
-
parseFromLocalFileData
public void parseFromLocalFileData(byte[] data, int offset, int length) 从接口复制的说明:ZipExtraFieldPopulate data from this array as if it was in local file data.- 指定者:
parseFromLocalFileData在接口中ZipExtraField- 参数:
data- the array of bytes.offset- the source location in the data array.length- the number of bytes to use in the data array.- 另请参阅:
-
parseFromCentralDirectoryData
public void parseFromCentralDirectoryData(byte[] data, int offset, int length) 从接口复制的说明:CentralDirectoryParsingZipExtraFieldPopulate data from this array as if it was in central directory data.- 指定者:
parseFromCentralDirectoryData在接口中CentralDirectoryParsingZipExtraField- 参数:
data- the array of bytes.offset- the source location in the data array.length- the number of bytes to use in the data array.
-