org.at4j.zip.ef
Class NtfsExtraFieldParser

java.lang.Object
  extended by org.at4j.zip.ef.NtfsExtraFieldParser
All Implemented Interfaces:
ZipEntryExtraFieldParser

public class NtfsExtraFieldParser
extends Object
implements ZipEntryExtraFieldParser

This parser is used for parsing extra fields of the type NtfsExtraField.

Since:
1.0
Author:
Karl Gustafsson
See Also:
NtfsExtraField

Field Summary
static NtfsExtraFieldParser INSTANCE
          Singleton instance that may be used instead of instantiating this class.
 
Constructor Summary
NtfsExtraFieldParser()
           
 
Method Summary
 UnsignedShort getCode()
          Get the code that identifies the kind of ZipEntryExtraField objects created by this factory.
 NtfsExtraField parse(byte[] barr, boolean inLocalHeader)
          Parse the extra field data and create a ZipEntryExtraField object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final NtfsExtraFieldParser INSTANCE
Singleton instance that may be used instead of instantiating this class.

Constructor Detail

NtfsExtraFieldParser

public NtfsExtraFieldParser()
Method Detail

getCode

public UnsignedShort getCode()
Description copied from interface: ZipEntryExtraFieldParser
Get the code that identifies the kind of ZipEntryExtraField objects created by this factory.

Specified by:
getCode in interface ZipEntryExtraFieldParser
Returns:
The code.

parse

public NtfsExtraField parse(byte[] barr,
                            boolean inLocalHeader)
                     throws ZipFileParseException
Description copied from interface: ZipEntryExtraFieldParser
Parse the extra field data and create a ZipEntryExtraField object.

Specified by:
parse in interface ZipEntryExtraFieldParser
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.