-
- All Implemented Interfaces:
-
org.readium.r2.shared.util.zip.compress.archivers.zip.ZipExtraField
public class UnrecognizedExtraField implements ZipExtraField
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.
-
-
Method Summary
Modifier and Type Method Description ZipShortgetHeaderId()Get the header id. voidsetHeaderId(ZipShort headerId)Set the header id. Array<byte>getCentralDirectoryData()Get the central data. ZipShortgetCentralDirectoryLength()Get the central data length.If there is no central data, get the local file data length. Array<byte>getLocalFileDataData()Get the local data. ZipShortgetLocalFileDataLength()Get the length of the local data. voidparseFromCentralDirectoryData(Array<byte> data, int offset, int length)voidparseFromLocalFileData(Array<byte> data, int offset, int length)voidsetCentralDirectoryData(Array<byte> data)Set the extra field data in central directory. voidsetLocalFileDataData(Array<byte> data)Set the extra field data in the local file data -without Header-ID or length specifier. -
-
Method Detail
-
getHeaderId
ZipShort getHeaderId()
Get the header id.
-
setHeaderId
void setHeaderId(ZipShort headerId)
Set the header id.
- Parameters:
headerId- the header id to use
-
getCentralDirectoryData
Array<byte> getCentralDirectoryData()
Get the central data.
-
getCentralDirectoryLength
ZipShort getCentralDirectoryLength()
Get the central data length.If there is no central data, get the local file data length.
-
getLocalFileDataData
Array<byte> getLocalFileDataData()
Get the local data.
-
getLocalFileDataLength
ZipShort getLocalFileDataLength()
Get the length of the local data.
-
parseFromCentralDirectoryData
void parseFromCentralDirectoryData(Array<byte> data, int offset, int length)
- Parameters:
data- the array of bytes.offset- the source location in the data array.length- the number of bytes to use in the data array.
-
parseFromLocalFileData
void parseFromLocalFileData(Array<byte> data, int offset, int length)
- Parameters:
data- the array of bytes.offset- the source location in the data array.length- the number of bytes to use in the data array.
-
setCentralDirectoryData
void setCentralDirectoryData(Array<byte> data)
Set the extra field data in central directory.
- Parameters:
data- the data to use
-
setLocalFileDataData
void setLocalFileDataData(Array<byte> data)
Set the extra field data in the local file data -without Header-ID or length specifier.
- Parameters:
data- the field data to use
-
-
-
-