org.codehaus.plexus.archiver.zip

Class UnrecognizedExtraField

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: 2436 $ $Date: 2005-09-01 13:20:41 -0400 (Thu, 01 Sep 2005) $ from org.apache.ant.tools.zip.UnrecognizedExtraField v1.8

Field Summary

private byte[]
centralData
Extra field data in central directory - without Header-ID or length specifier.
private ZipShort
headerId
The Header-ID.
private byte[]
localData
Extra field data in local file data - without Header-ID or length specifier.

Method Summary

byte[]
getCentralDirectoryData()
The actual data to put 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.
ZipShort
getHeaderId()
The Header-ID.
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.
void
parseFromLocalFileData(byte[] data, int offset, int length)
Populate data from this array as if it was in local file data.
void
setCentralDirectoryData(byte[] data)
void
setHeaderId(ZipShort headerId)
void
setLocalFileDataData(byte[] data)

Field Details

centralData

private byte[] centralData
Extra field data in central directory - without Header-ID or length specifier.
Since:
1.1

headerId

private ZipShort headerId
The Header-ID.
Since:
1.1

localData

private byte[] localData
Extra field data in local file data - without Header-ID or length specifier.
Since:
1.1

Method Details

getCentralDirectoryData

public byte[] getCentralDirectoryData()
The actual data to put central directory - without Header-ID or length specifier.
Specified by:
getCentralDirectoryData in interface ZipExtraField
Since:
1.1

getCentralDirectoryLength

public ZipShort getCentralDirectoryLength()
Length of the extra field in the central directory - without Header-ID or length specifier.
Specified by:
getCentralDirectoryLength in interface ZipExtraField
Since:
1.1

getHeaderId

public ZipShort getHeaderId()
The Header-ID.
Specified by:
getHeaderId in interface ZipExtraField
Since:
1.1

getLocalFileDataData

public byte[] getLocalFileDataData()
The actual data to put into local file data - without Header-ID or length specifier.
Specified by:
getLocalFileDataData in interface ZipExtraField
Since:
1.1

getLocalFileDataLength

public ZipShort getLocalFileDataLength()
Length of the extra field in the local file data - without Header-ID or length specifier.
Specified by:
getLocalFileDataLength in interface ZipExtraField
Since:
1.1

parseFromLocalFileData

public void parseFromLocalFileData(byte[] data,
                                   int offset,
                                   int length)
Populate data from this array as if it was in local file data.
Specified by:
parseFromLocalFileData in interface ZipExtraField
Since:
1.1

setCentralDirectoryData

public void setCentralDirectoryData(byte[] data)

setHeaderId

public void setHeaderId(ZipShort headerId)

setLocalFileDataData

public void setLocalFileDataData(byte[] data)