org.at4j.zip.ef
Interface ZipEntryExtraFieldParser

All Known Implementing Classes:
ExtendedTimestampExtraFieldParser, InfoZipUnixExtraFieldParser, NewInfoZipUnixExtraFieldParser, NtfsExtraFieldParser, UnicodeCommentExtraFieldParser, UnicodePathExtraFieldParser, UnparsedZipEntryExtraFieldParser

public interface ZipEntryExtraFieldParser

A Zip entry extra field parser is used to parse extra fields when creating a ZipFile object.

Every extra field type has a unique code identifying it. This code can be used to look up a parser implementation using the ZipEntryExtraFieldParserRegistry.

Since:
1.0
Author:
Karl Gustafsson
See Also:
ZipEntryExtraField, ZipEntryExtraFieldParserRegistry

Method Summary
 UnsignedShort getCode()
          Get the code that identifies the kind of ZipEntryExtraField objects created by this factory.
 ZipEntryExtraField parse(byte[] barr, boolean inLocalHeader)
          Parse the extra field data and create a ZipEntryExtraField object.
 

Method Detail

getCode

UnsignedShort getCode()
Get the code that identifies the kind of ZipEntryExtraField objects created by this factory.

Returns:
The code.

parse

ZipEntryExtraField parse(byte[] barr,
                         boolean inLocalHeader)
                         throws ZipFileParseException
Parse the extra field data and create a ZipEntryExtraField object.

Parameters:
barr - A byte array containing the extra field data. This array does not contain the initial four bytes identifying the extra field type and the extra field size.
inLocalHeader - Is the extra field from the Zip entry's local header (true) of from the central header (false)?
Returns:
A Zip entry extra field object.
Throws:
ZipFileParseException - If the contents of the array cannot be parsed.