| Modifier and Type | Class and Description |
|---|---|
| public static class | ExtraFieldUtils.UnparseableExtraField
"enum" for the possible actions to take if the extra field cannot be parsed. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | implementations
Static registry of known extra fields. |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ZipExtraField | Returns: an instance of the appropriate ExtraFieldthe header identifier headerId)Create an instance of the appropriate ExtraField, falls back to
|
| public static byte[] | Returns: an array of bytesan array of ExtraFields data)Merges the central directory fields of the given ZipExtraFields. |
| public static byte[] | Returns: an array of bytesan array of ExtraFiles data)Merges the local file data fields of the given ZipExtraFields. |
| public static ZipExtraField[] | Returns: an array of ExtraFieldsan array of bytes as it appears in local file data data)Split the array into ExtraFields and populate them with the given data as local file data, throwing an exception if the data cannot be parsed. |
| public static ZipExtraField[] | Returns: an array of ExtraFieldsan array of bytes data, boolean whether data originates from the local file data
or the central directory local)Split the array into ExtraFields and populate them with the given data, throwing an exception if the data cannot be parsed. |
| public static ZipExtraField[] | Returns: an array of ExtraFieldsan array of bytes data, boolean whether data originates from the local file data
or the central directory local, ExtraFieldUtils.what to do if the extra field data
cannot be parsed. onUnparseableDataSplit the array into ExtraFields and populate them with the given data. |
| public static void |
| implementations | back to summary |
|---|---|
| private static final Map<ZipShort, Class<?>> implementations Static registry of known extra fields.
| |
| WORD | back to summary |
|---|---|
| private static final int WORD | |
| ExtraFieldUtils | back to summary |
|---|---|
| public ExtraFieldUtils() | |
| createExtraField | back to summary |
|---|---|
| public static ZipExtraField createExtraField(ZipShort headerId) throws InstantiationException, IllegalAccessException Create an instance of the appropriate ExtraField, falls back to
| |
| mergeCentralDirectoryData | back to summary |
|---|---|
| public static byte[] mergeCentralDirectoryData(ZipExtraField[] data) Merges the central directory fields of the given ZipExtraFields.
| |
| mergeLocalFileDataData | back to summary |
|---|---|
| public static byte[] mergeLocalFileDataData(ZipExtraField[] data) Merges the local file data fields of the given ZipExtraFields.
| |
| parse | back to summary |
|---|---|
| public static ZipExtraField[] parse(byte[] data) throws ZipException Split the array into ExtraFields and populate them with the given data as local file data, throwing an exception if the data cannot be parsed.
| |
| parse | back to summary |
|---|---|
| public static ZipExtraField[] parse(byte[] data, boolean local) throws ZipException Split the array into ExtraFields and populate them with the given data, throwing an exception if the data cannot be parsed.
| |
| parse | back to summary |
|---|---|
| public static ZipExtraField[] parse(byte[] data, boolean local, ExtraFieldUtils. Split the array into ExtraFields and populate them with the given data.
| |
| register | back to summary |
|---|---|
| public static void register(Class<?> c) Register a ZipExtraField implementation. The given class must have a no-arg constructor and implement
the
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| public static final ExtraFieldUtils. | READ
Read the extra field data into an instance of |
| public static final int | READ_KEY
Key for "read" action. |
| public static final ExtraFieldUtils. | SKIP
Skip the extra field entirely and don't make its data available - effectively removing the extra field data. |
| public static final int | SKIP_KEY
Key for "skip" action. |
| public static final ExtraFieldUtils. | THROW
Throw an exception if field cannot be parsed. |
| public static final int | THROW_KEY
Key for "throw an exception" action. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| key | back to summary |
|---|---|
| private final int key | |
| READ | back to summary |
|---|---|
| public static final ExtraFieldUtils. Read the extra field data into an instance of | |
| READ_KEY | back to summary |
|---|---|
| public static final int READ_KEY Key for "read" action. | |
| SKIP | back to summary |
|---|---|
| public static final ExtraFieldUtils. Skip the extra field entirely and don't make its data available - effectively removing the extra field data. | |
| SKIP_KEY | back to summary |
|---|---|
| public static final int SKIP_KEY Key for "skip" action. | |
| THROW | back to summary |
|---|---|
| public static final ExtraFieldUtils. Throw an exception if field cannot be parsed. | |
| THROW_KEY | back to summary |
|---|---|
| public static final int THROW_KEY Key for "throw an exception" action. | |
| UnparseableExtraField | back to summary |
|---|---|
| private UnparseableExtraField(int k) | |
| getKey | back to summary |
|---|---|
| public int getKey() Key of the action to take.
| |