Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.zip
Class UnparseableExtraFieldData

    java.lang.Object
      org.apache.tools.zip.UnparseableExtraFieldData

All Implemented Interfaces:
  CentralDirectoryParsingZipExtraField, ZipExtraField

    public final class UnparseableExtraFieldData

extends java.lang.Object
implements CentralDirectoryParsingZipExtraField

Wrapper for extra field data that doesn't conform to the recommended format of header-tag + size + data.

The header-id is artificial (and not listed as a know ID in `APPNOTE.TXT`. Since it isn't used anywhere except to satisfy the ZipExtraField contract it shouldn't matter anyway.

Since:
  Ant 1.8.1

Constructor Summary
`UnparseableExtraFieldData()`

Method Summary
`byte[]` | `getCentralDirectoryData()` The actual data to put into central directory.
`ZipShort` | `getCentralDirectoryLength()` Length of the complete extra field in the central directory.
`ZipShort` | `getHeaderId()` The Header-ID.
`byte[]` | `getLocalFileDataData()` The actual data to put into local file data.
`ZipShort` | `getLocalFileDataLength()` Length of the complete extra field in the local file data.
`void` | `parseFromCentralDirectoryData(byte[] buffer, int offset, int length)` Populate data from this array as if it was in central directory data.
`void` | `parseFromLocalFileData(byte[] buffer, int offset, int length)` Populate data from this array as if it was in local file data.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UnparseableExtraFieldData

    public UnparseableExtraFieldData()

Method Detail

### getHeaderId

    public ZipShort getHeaderId()

  The Header-ID.

  Specified by:
    `getHeaderId` in interface `ZipExtraField`
  Returns:
    a completely arbitrary value that should be ignored.

### getLocalFileDataLength

    public ZipShort getLocalFileDataLength()

  Length of the complete extra field in the local file data.

  Specified by:
    `getLocalFileDataLength` in interface `ZipExtraField`
  Returns:
    The LocalFileDataLength value

### getCentralDirectoryLength

    public ZipShort getCentralDirectoryLength()

  Length of the complete extra field in the central directory.

  Specified by:
    `getCentralDirectoryLength` in interface `ZipExtraField`
  Returns:
    The CentralDirectoryLength value

### getLocalFileDataData

    public byte[] getLocalFileDataData()

  The actual data to put into local file data.

  Specified by:
    `getLocalFileDataData` in interface `ZipExtraField`
  Returns:
    The LocalFileDataData value

### getCentralDirectoryData

    public byte[] getCentralDirectoryData()

  The actual data to put into central directory.

  Specified by:
    `getCentralDirectoryData` in interface `ZipExtraField`
  Returns:
    The CentralDirectoryData value

### parseFromLocalFileData

    public void parseFromLocalFileData(byte[] buffer,
                                       int offset,
                                       int length)

  Populate data from this array as if it was in local file data.

  Specified by:
    `parseFromLocalFileData` in interface `ZipExtraField`
  Parameters:
    `buffer` - the buffer to read data from
    `offset` - offset into buffer to read data
    `length` - the length of data

### parseFromCentralDirectoryData

    public void parseFromCentralDirectoryData(byte[] buffer,
                                              int offset,
                                              int length)

  Populate data from this array as if it was in central directory data.

  Specified by:
    `parseFromCentralDirectoryData` in interface `CentralDirectoryParsingZipExtraField`
  Parameters:
    `buffer` - the buffer to read data from
    `offset` - offset into buffer to read data
    `length` - the length of data
  Throws:
    `ZipException` - on error

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD