Top Description Methods
org.apache.commons.compress.archivers.zip

public Interface UnparseableExtraFieldBehavior

Known Direct Subinterfaces
org.apache.commons.compress.archivers.zip.ExtraFieldParsingBehavior
Known Direct Implementers
org.apache.commons.compress.archivers.zip.ExtraFieldUtils.UnparseableExtraField
Imports
java.util.zip.ZipException

Handles extra field data that doesn't follow the recommended pattern for extra fields with a two-byte key and a two-byte length.
Since
1.19

Method Summary

Modifier and TypeMethod and Description
public ZipExtraField

Returns:

null if the data should be ignored or an extra field implementation that represents the data
onUnparseableExtraField
(byte[]
the array of extra field data
data
,
int
offset into data where the unparseable data starts
off
,
int
the length of unparseable data
len
,
boolean
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.
local
,
int
length of the extra field claimed by the third and forth byte if it did follow the recommended pattern
claimedLength
)

Decides what to do with extra field data that doesn't follow the recommended pattern.

Method Detail

onUnparseableExtraFieldback to summary
public ZipExtraField onUnparseableExtraField(byte[] data, int off, int len, boolean local, int claimedLength) throws ZipException

Decides what to do with extra field data that doesn't follow the recommended pattern.

Parameters
data:byte[]

the array of extra field data

off:int

offset into data where the unparseable data starts

len:int

the length of unparseable data

local:boolean

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.

claimedLength:int

length of the extra field claimed by the third and forth byte if it did follow the recommended pattern

Returns:ZipExtraField

null if the data should be ignored or an extra field implementation that represents the data

Exceptions
ZipException:
if an error occurs or unparseable extra fields must not be accepted