-
- All Implemented Interfaces:
-
org.readium.r2.shared.util.zip.compress.archivers.zip.ZipExtraField
public abstract class AbstractUnicodeExtraField implements ZipExtraField
A common base class for Unicode extra information extra fields.
-
-
Field Summary
Fields Modifier and Type Field Description private longnameCRC32private Array<byte>unicodeName
-
Method Summary
Modifier and Type Method Description longgetNameCRC32()voidsetNameCRC32(long nameCRC32)Array<byte>getUnicodeName()voidsetUnicodeName(Array<byte> unicodeName)Array<byte>getCentralDirectoryData()The actual data to put into central directory - without Header-ID orlength specifier. ZipShortgetCentralDirectoryLength()Length of the extra field in the central directory - withoutHeader-ID or length specifier. Array<byte>getLocalFileDataData()The actual data to put into local file data - without Header-IDor length specifier. ZipShortgetLocalFileDataLength()Length of the extra field in the local file data - withoutHeader-ID or length specifier. voidparseFromCentralDirectoryData(Array<byte> buffer, int offset, int length)Doesn't do anything special since this class always uses thesame data in central directory and local file data. voidparseFromLocalFileData(Array<byte> buffer, int offset, int length)Populate data from this array as if it was in local file data. -
Methods inherited from class org.readium.r2.shared.util.zip.compress.archivers.zip.ZipExtraField
getHeaderId, parseFromCentralDirectoryData, parseFromLocalFileData -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getNameCRC32
long getNameCRC32()
-
setNameCRC32
void setNameCRC32(long nameCRC32)
- Parameters:
nameCRC32- The CRC32 checksum of the file name as encodedin the central directory of the zip file to set.
-
getUnicodeName
Array<byte> getUnicodeName()
-
setUnicodeName
void setUnicodeName(Array<byte> unicodeName)
- Parameters:
unicodeName- The UTF-8 encoded name to set.
-
getCentralDirectoryData
Array<byte> getCentralDirectoryData()
The actual data to put into central directory - without Header-ID orlength specifier.
-
getCentralDirectoryLength
ZipShort getCentralDirectoryLength()
Length of the extra field in the central directory - withoutHeader-ID or length specifier.
-
getLocalFileDataData
Array<byte> getLocalFileDataData()
The actual data to put into local file data - without Header-IDor length specifier.
-
getLocalFileDataLength
ZipShort getLocalFileDataLength()
Length of the extra field in the local file data - withoutHeader-ID or length specifier.
-
parseFromCentralDirectoryData
void parseFromCentralDirectoryData(Array<byte> buffer, int offset, int length)
Doesn't do anything special since this class always uses thesame data in central directory and local file data.
-
parseFromLocalFileData
void parseFromLocalFileData(Array<byte> buffer, int offset, int length)
Populate data from this array as if it was in local file data.
- Parameters:
buffer- the buffer to read data fromoffset- offset into buffer to read datalength- the length of data
-
-
-
-