接口 ZipExtraField
- 所有已知子接口:
CentralDirectoryParsingZipExtraField
- 所有已知实现类:
AbstractUnicodeExtraField,AsiExtraField,JarMarker,UnicodeCommentExtraField,UnicodePathExtraField,UnparseableExtraFieldData,UnrecognizedExtraField
public interface ZipExtraField
General 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.ZipOutputStream will
only use the local file data in both places.
-
方法概要
修饰符和类型方法说明byte[]The actual data to put into central directory - without Header-ID or length specifier.Length of the extra field in the central directory - without Header-ID or length specifier.The Header-ID.byte[]The actual data to put into local file data - without Header-ID or length specifier.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.
-
方法详细资料
-
getHeaderId
ZipShort getHeaderId()The Header-ID.- 返回:
- the header id
- 从以下版本开始:
- 1.1
-
getLocalFileDataLength
ZipShort getLocalFileDataLength()Length of the extra field in the local file data - without Header-ID or length specifier.- 返回:
- the length of the field in the local file data
- 从以下版本开始:
- 1.1
-
getCentralDirectoryLength
ZipShort getCentralDirectoryLength()Length of the extra field in the central directory - without Header-ID or length specifier.- 返回:
- the length of the field in the central directory
- 从以下版本开始:
- 1.1
-
getLocalFileDataData
byte[] getLocalFileDataData()The actual data to put into local file data - without Header-ID or length specifier.- 返回:
- the data
- 从以下版本开始:
- 1.1
-
getCentralDirectoryData
byte[] getCentralDirectoryData()The actual data to put into central directory - without Header-ID or length specifier.- 返回:
- the data
- 从以下版本开始:
- 1.1
-
parseFromLocalFileData
Populate data from this array as if it was in local file data.- 参数:
data- an array of bytesoffset- the start offsetlength- the number of bytes in the array from offset- 抛出:
ZipException- on error- 从以下版本开始:
- 1.1
-