Class UnrecognizedExtraField
- java.lang.Object
-
- org.apache.commons.compress.archivers.zip.UnrecognizedExtraField
-
- All Implemented Interfaces:
ZipExtraField
public class UnrecognizedExtraField extends java.lang.Object 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.
- Version:
- $Revision: 155439 $
- Author:
- Stefan Bodewig
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]m_centralDataExtra field data in central directory - without Header-ID or length specifier.private ZipShortm_headerIDThe Header-ID.private byte[]m_localDataExtra field data in local file data - without Header-ID or length specifier.
-
Constructor Summary
Constructors Constructor Description UnrecognizedExtraField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getCentralDirectoryData()Get the central directory data.ZipShortgetCentralDirectoryLength()Get the length of the central directory in bytes.ZipShortgetHeaderID()Get the HeaderID.byte[]getLocalFileDataData()Get the local file data.ZipShortgetLocalFileDataLength()Get the length of local file data in bytes.voidparseFromLocalFileData(byte[] buffer, int offset, int length)Parse LocalFiledata out of supplied buffer.voidsetCentralDirectoryData(byte[] centralData)Set the central directory datavoidsetHeaderID(ZipShort headerID)Set the header ID.voidsetLocalFileDataData(byte[] localData)Set the local file data.
-
-
-
Field Detail
-
m_centralData
private byte[] m_centralData
Extra field data in central directory - without Header-ID or length specifier.- Since:
- 1.1
-
m_headerID
private ZipShort m_headerID
The Header-ID.- Since:
- 1.1
-
m_localData
private byte[] m_localData
Extra field data in local file data - without Header-ID or length specifier.- Since:
- 1.1
-
-
Method Detail
-
setCentralDirectoryData
public void setCentralDirectoryData(byte[] centralData)
Set the central directory data- Parameters:
centralData- the central directory data
-
setHeaderID
public void setHeaderID(ZipShort headerID)
Set the header ID.- Parameters:
headerID- the header ID
-
setLocalFileDataData
public void setLocalFileDataData(byte[] localData)
Set the local file data.- Parameters:
localData- the local file data
-
getCentralDirectoryData
public byte[] getCentralDirectoryData()
Get the central directory data.- Specified by:
getCentralDirectoryDatain interfaceZipExtraField- Returns:
- the central directory data.
-
getCentralDirectoryLength
public ZipShort getCentralDirectoryLength()
Get the length of the central directory in bytes.- Specified by:
getCentralDirectoryLengthin interfaceZipExtraField- Returns:
- the length of the central directory in bytes.
-
getHeaderID
public ZipShort getHeaderID()
Get the HeaderID.- Specified by:
getHeaderIDin interfaceZipExtraField- Returns:
- the HeaderID
-
getLocalFileDataData
public byte[] getLocalFileDataData()
Get the local file data.- Specified by:
getLocalFileDataDatain interfaceZipExtraField- Returns:
- the local file data
-
getLocalFileDataLength
public ZipShort getLocalFileDataLength()
Get the length of local file data in bytes.- Specified by:
getLocalFileDataLengthin interfaceZipExtraField- Returns:
- the length of local file data in bytes
-
parseFromLocalFileData
public void parseFromLocalFileData(byte[] buffer, int offset, int length)Parse LocalFiledata out of supplied buffer.- Specified by:
parseFromLocalFileDatain interfaceZipExtraField- Parameters:
buffer- the buffer to useoffset- the offset into bufferlength- then length of data
-
-