public abstract class AbstractUnicodeExtraField extends java.lang.Object implements ZipExtraField
EXTRAFIELD_HEADER_SIZE| Modifier and Type | Method and Description |
|---|---|
byte[] |
getCentralDirectoryData()
The actual data to put into central directory - without Header-ID or length specifier.
|
ZipShort |
getCentralDirectoryLength()
Length of the extra field in the central directory - without Header-ID or length specifier.
|
byte[] |
getLocalFileDataData()
The actual data to put into local file data - without Header-ID or length specifier.
|
ZipShort |
getLocalFileDataLength()
Length of the extra field in the local file data - without Header-ID or length specifier.
|
long |
getNameCRC32()
Gets the CRC32 checksum of the file name or comment as encoded in the central directory of the ZIP file.
|
byte[] |
getUnicodeName()
Gets The UTF-8 encoded name.
|
void |
parseFromCentralDirectoryData(byte[] buffer,
int offset,
int length)
Doesn't do anything special since this class always uses the same data in central directory and local file data.
|
void |
parseFromLocalFileData(byte[] buffer,
int offset,
int length)
Populate data from this array as if it was in local file data.
|
void |
setNameCRC32(long nameCRC32)
Gets The CRC32 checksum of the file name as encoded in the central directory of the ZIP file to set.
|
void |
setUnicodeName(byte[] unicodeName)
Gets the UTF-8 encoded name to set.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeaderIdpublic byte[] getCentralDirectoryData()
ZipExtraFieldgetCentralDirectoryData in interface ZipExtraFieldpublic ZipShort getCentralDirectoryLength()
ZipExtraFieldgetCentralDirectoryLength in interface ZipExtraFieldpublic byte[] getLocalFileDataData()
ZipExtraFieldgetLocalFileDataData in interface ZipExtraFieldpublic ZipShort getLocalFileDataLength()
ZipExtraFieldgetLocalFileDataLength in interface ZipExtraFieldpublic long getNameCRC32()
public byte[] getUnicodeName()
public void parseFromCentralDirectoryData(byte[] buffer,
int offset,
int length)
throws java.util.zip.ZipException
parseFromCentralDirectoryData in interface ZipExtraFieldbuffer - the buffer to read data fromoffset - offset into buffer to read datalength - the length of datajava.util.zip.ZipException - on errorpublic void parseFromLocalFileData(byte[] buffer,
int offset,
int length)
throws java.util.zip.ZipException
ZipExtraFieldparseFromLocalFileData in interface ZipExtraFieldbuffer - the buffer to read data fromoffset - offset into buffer to read datalength - the length of datajava.util.zip.ZipException - on errorpublic void setNameCRC32(long nameCRC32)
nameCRC32 - The CRC32 checksum of the file name as encoded in the central directory of the ZIP file to set.public void setUnicodeName(byte[] unicodeName)
unicodeName - The UTF-8 encoded name to set.Copyright © 2010 - 2024 Adobe. All Rights Reserved