fillExtraField

open fun fillExtraField(ze: ZipExtraField, data: Array<Byte>, off: Int, len: Int, local: Boolean): ZipExtraField

Fills in the extra field data into the given instance.

Calls parseFromCentralDirectoryData or parseFromLocalFileData internally and wraps any ArrayIndexOutOfBoundsException thrown into a ZipException.

Return

the filled field, will never be null

Since

1.19

Parameters

ze

the extra field instance to fill

data

the array of extra field data

off

offset into data where this field's data starts

len

the length of this field's data

local

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.

Throws

if an error occurs