org.apache.commons.compress.zip
Class UnrecognizedExtraField

java.lang.Object
  extended byorg.apache.commons.compress.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: 1.2 $

Constructor Summary
UnrecognizedExtraField()
           
 
Method Summary
 byte[] getCentralDirectoryData()
          Get the central directory data.
 ZipShort getCentralDirectoryLength()
          Get the length of the central directory in bytes.
 ZipShort getHeaderId()
          Deprecated. Use getHeaderID() instead
 ZipShort getHeaderID()
          Get the HeaderID.
 byte[] getLocalFileDataData()
          Get the local file data.
 ZipShort getLocalFileDataLength()
          Get the length of local file data in bytes.
 void parseFromLocalFileData(byte[] buffer, int offset, int length)
          Parse LocalFiledata out of supplied buffer.
 void setCentralDirectoryData(byte[] centralData)
          Set the central directory data
 void setHeaderId(ZipShort headerID)
          Deprecated. Use setHeaderID() instead
 void setHeaderID(ZipShort headerID)
          Set the header ID.
 void setLocalFileDataData(byte[] localData)
          Set the local file data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnrecognizedExtraField

public UnrecognizedExtraField()
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)
Deprecated. Use setHeaderID() instead

Set the header ID.

Parameters:
headerID - the header ID
See Also:
setHeaderID(ZipShort)

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:
getCentralDirectoryData in interface ZipExtraField
Returns:
the central directory data.

getCentralDirectoryLength

public ZipShort getCentralDirectoryLength()
Get the length of the central directory in bytes.

Specified by:
getCentralDirectoryLength in interface ZipExtraField
Returns:
the length of the central directory in bytes.

getHeaderId

public ZipShort getHeaderId()
Deprecated. Use getHeaderID() instead

Get the HeaderID.

Returns:
the HeaderID
See Also:
getHeaderID()

getHeaderID

public ZipShort getHeaderID()
Get the HeaderID.

Specified by:
getHeaderID in interface ZipExtraField
Returns:
the HeaderID

getLocalFileDataData

public byte[] getLocalFileDataData()
Get the local file data.

Specified by:
getLocalFileDataData in interface ZipExtraField
Returns:
the local file data

getLocalFileDataLength

public ZipShort getLocalFileDataLength()
Get the length of local file data in bytes.

Specified by:
getLocalFileDataLength in interface ZipExtraField
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:
parseFromLocalFileData in interface ZipExtraField
Parameters:
buffer - the buffer to use
offset - the offset into buffer
length - then length of data


Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.