ExtraFieldParsingMode

How to try to parse the extra fields.

Configures the behavior for:

  • What shall happen if the extra field content doesn't follow the recommended pattern of two-byte id followed by a two-byte length?
  • What shall happen if an extra field is generally supported by Commons Compress but its content cannot be parsed correctly? This may for example happen if the archive is corrupt, it triggers a bug in Commons Compress or the extra field uses a version not (yet) supported by Commons Compress.

Since

1.19

Entries

Link copied to clipboard

Try to parse as many extra fields as possible and wrap unknown extra fields as well as supported extra fields that cannot be parsed in UnrecognizedExtraField.

Link copied to clipboard

Try to parse as many extra fields as possible and wrap unknown extra fields in UnrecognizedExtraField.

Link copied to clipboard

Try to parse as many extra fields as possible and wrap unknown extra fields as well as supported extra fields that cannot be parsed in UnrecognizedExtraField.

Link copied to clipboard

Try to parse as many extra fields as possible and wrap unknown extra fields in UnrecognizedExtraField.

Link copied to clipboard

Throw an exception if any of the recognized extra fields cannot be parsed or any extra field violates the recommended pattern.

Functions

Link copied to clipboard
Creates an instance of ZipExtraField for the given id.
Link copied to clipboard
open fun fill(field: ZipExtraField, data: Array<Byte>, off: Int, len: Int, local: Boolean): ZipExtraField
Fills in the extra field data for a single extra field.
Link copied to clipboard
open fun onUnparseableExtraField(data: Array<Byte>, off: Int, len: Int, local: Boolean, claimedLength: Int): ZipExtraField
Decides what to do with extra field data that doesn't follow the recommended pattern.
Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.