org.apache.tools.zip
Class UnrecognizedExtraField
java.lang.Objectorg.apache.tools.zip.UnrecognizedExtraField
- ZipExtraField
public class UnrecognizedExtraField
extends java.lang.Object
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.
getCentralDirectoryData
public byte[] getCentralDirectoryData()
Get the central data.
- getCentralDirectoryData in interface ZipExtraField
- the central data if present, else return the local file data
parseFromLocalFileData
public void parseFromLocalFileData(byte[] data,
int offset,
int length)- parseFromLocalFileData in interface ZipExtraField
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
public void setCentralDirectoryData(byte[] data)
Set the extra field data in central directory.
setHeaderId
public void setHeaderId(ZipShort headerId)
Set the header id.
headerId - the header id to use
setLocalFileDataData
public void setLocalFileDataData(byte[] data)
Set the extra field data in the local file data -
without Header-ID or length specifier.
data - the field data to use