类 AbstractUnicodeExtraField
java.lang.Object
com.sh.common.zip.AbstractUnicodeExtraField
- 所有已实现的接口:
ZipExtraField
A common base class for Unicode extra information extra fields.
-
构造器概要
构造器限定符构造器说明protectedprotectedAbstractUnicodeExtraField(String text, byte[] bytes) Assemble as unicode extension from the name/comment and encoding of the orginal zip entry.protectedAbstractUnicodeExtraField(String text, byte[] bytes, int off, int len) Assemble as unicode extension from the name/comment and encoding of the orginal zip entry. -
方法概要
修饰符和类型方法说明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.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.longbyte[]voidparseFromLocalFileData(byte[] buffer, int offset, int length) Populate data from this array as if it was in local file data.voidsetNameCRC32(long nameCRC32) voidsetUnicodeName(byte[] unicodeName) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.sh.common.zip.ZipExtraField
getHeaderId
-
构造器详细资料
-
AbstractUnicodeExtraField
protected AbstractUnicodeExtraField() -
AbstractUnicodeExtraField
Assemble as unicode extension from the name/comment and encoding of the orginal zip entry.- 参数:
text- The file name or comment.bytes- The encoded of the filename or comment in the zip file.off- The offset of the encoded filename or comment inbytes.len- The length of the encoded filename or commentinbytes.
-
AbstractUnicodeExtraField
Assemble as unicode extension from the name/comment and encoding of the orginal zip entry.- 参数:
text- The file name or comment.bytes- The encoded of the filename or comment in the zip file.
-
-
方法详细资料
-
getNameCRC32
public long getNameCRC32()- 返回:
- The CRC32 checksum of the filename or comment as encoded in the central directory of the zip file.
-
setNameCRC32
public void setNameCRC32(long nameCRC32) - 参数:
nameCRC32- The CRC32 checksum of the filename as encoded in the central directory of the zip file to set.
-
getUnicodeName
public byte[] getUnicodeName()- 返回:
- The utf-8 encoded name.
-
setUnicodeName
public void setUnicodeName(byte[] unicodeName) - 参数:
unicodeName- The utf-8 encoded name to set.
-
getCentralDirectoryData
public byte[] getCentralDirectoryData()从接口复制的说明:ZipExtraFieldThe actual data to put into central directory - without Header-ID or length specifier.- 指定者:
getCentralDirectoryData在接口中ZipExtraField- 返回:
- the data
-
getCentralDirectoryLength
从接口复制的说明:ZipExtraFieldLength of the extra field in the central directory - without Header-ID or length specifier.- 指定者:
getCentralDirectoryLength在接口中ZipExtraField- 返回:
- the length of the field in the central directory
-
getLocalFileDataData
public byte[] getLocalFileDataData()从接口复制的说明:ZipExtraFieldThe actual data to put into local file data - without Header-ID or length specifier.- 指定者:
getLocalFileDataData在接口中ZipExtraField- 返回:
- the data
-
getLocalFileDataLength
从接口复制的说明:ZipExtraFieldLength of the extra field in the local file data - without Header-ID or length specifier.- 指定者:
getLocalFileDataLength在接口中ZipExtraField- 返回:
- the length of the field in the local file data
-
parseFromLocalFileData
从接口复制的说明:ZipExtraFieldPopulate data from this array as if it was in local file data.- 指定者:
parseFromLocalFileData在接口中ZipExtraField- 参数:
buffer- an array of bytesoffset- the start offsetlength- the number of bytes in the array from offset- 抛出:
ZipException- on error
-