org.apache.excalibur.zip
Class ExtraFieldUtils
java.lang.Object
|
+--org.apache.excalibur.zip.ExtraFieldUtils
- public class ExtraFieldUtils
- extends Object
ZipExtraField related methods
- Version:
- $Revision: 1.4 $
- Author:
- Stefan Bodewig
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtraFieldUtils
public ExtraFieldUtils()
createExtraField
public static ZipExtraField createExtraField(ZipShort headerID)
throws InstantiationException,
IllegalAccessException
- Create an instance of the approriate ExtraField, falls back to
UnrecognizedExtraField
.
Throws java.lang.IllegalAccessException if cant create implementation.
- Parameters:
headerID
- the header ID- Returns:
- the extra field implementation
- Throws:
InstantiationException
- if cant create implementationIllegalAccessException
- if cant create implementation- Since:
- 1.1
mergeCentralDirectoryData
public static byte[] mergeCentralDirectoryData(ZipExtraField[] data)
- Merges the central directory fields of the given ZipExtraFields.
- Parameters:
data
- the central directory data- Returns:
- the merged data
- Since:
- 1.1
mergeLocalFileDataData
public static byte[] mergeLocalFileDataData(ZipExtraField[] data)
- Merges the local file data fields of the given ZipExtraFields.
- Parameters:
data
- the data- Returns:
- the merged data
- Since:
- 1.1
parse
public static ZipExtraField[] parse(byte[] data)
throws ZipException
- Split the array into ExtraFields and populate them with the give data.
- Parameters:
data
- the data to parse- Returns:
- the parsed fields
- Throws:
ZipException
- on error- Since:
- 1.1
register
public static void register(Class clazz)
- Register a ZipExtraField implementation.
The given class must have a no-arg constructor and implement the ZipExtraField interface
.
- Parameters:
clazz
- The Class for particular implementation- Since:
- 1.1
"Copyright © 2002 Apache Jakarta Project. All Rights Reserved."