org.apache.commons.compress.archivers.zip
public class ExtraFieldUtils extends Object
Version: $Revision: 155439 $
Field Summary | |
---|---|
static Hashtable | c_implementations
Static registry of known extra fields.
|
Method Summary | |
---|---|
static ZipExtraField | createExtraField(ZipShort headerID)
Create an instance of the approriate ExtraField, falls back to UnrecognizedExtraField .
|
static byte[] | mergeCentralDirectoryData(ZipExtraField[] data)
Merges the central directory fields of the given ZipExtraFields.
|
static byte[] | mergeLocalFileDataData(ZipExtraField[] data)
Merges the local file data fields of the given ZipExtraFields.
|
static ZipExtraField[] | parse(byte[] data)
Split the array into ExtraFields and populate them with the give data.
|
static void | register(Class clazz)
Register a ZipExtraField implementation. |
Since: 1.1
UnrecognizedExtraField
.
Throws java.lang.IllegalAccessException if cant create implementation.
Parameters: headerID the header ID
Returns: the extra field implementation
Throws: InstantiationException if cant create implementation IllegalAccessException if cant create implementation
Since: 1.1
Parameters: data the central directory data
Returns: the merged data
Since: 1.1
Parameters: data the data
Returns: the merged data
Since: 1.1
Parameters: data the data to parse
Returns: the parsed fields
Throws: ZipException on error
Since: 1.1
The given class must have a no-arg constructor and implement the ZipExtraField interface
.
Parameters: clazz The Class for particular implementation
Since: 1.1