public interface ExtraFieldParsingBehavior extends UnparseableExtraFieldBehavior
Modifier and Type | Method and Description |
---|---|
ZipExtraField |
createExtraField(ZipShort headerId)
Creates an instance of ZipExtraField for the given id.
|
ZipExtraField |
fill(ZipExtraField field,
byte[] data,
int off,
int len,
boolean local)
Fills in the extra field data for a single extra field.
|
onUnparseableExtraField
ZipExtraField createExtraField(ZipShort headerId) throws ZipException, InstantiationException, IllegalAccessException
A good default implementation would be ExtraFieldUtils.createExtraField(org.apache.commons.compress.archivers.zip.ZipShort)
.
headerId
- the id for the extra fieldnull
ZipException
- if an error occursInstantiationException
- if unable to instantiate the classIllegalAccessException
- if not allowed to instantiate the classZipExtraField fill(ZipExtraField field, byte[] data, int off, int len, boolean local) throws ZipException
A good default implementation would be ExtraFieldUtils.fillExtraField(org.apache.commons.compress.archivers.zip.ZipExtraField, byte[], int, int, boolean)
.
field
- the extra field instance to filldata
- the array of extra field dataoff
- offset into data where this field's data startslen
- the length of this field's datalocal
- whether the extra field data stems from the local
file header. If this is false then the data is part if the
central directory header extra data.field
but it oculd be a replacement extra field as well. Must
not be null
.ZipException
- if an error occursCopyright © 2020 The Apache Software Foundation. All rights reserved.