Package org.apache.commons.compress.compressors.gzip

# Class ExtraField.SubField

java.lang.Object
org.apache.commons.compress.compressors.gzip.ExtraField.SubField

Enclosing class:
  `ExtraField`

public static final class ExtraField.SubField extends Object
If the `FLG.FEXTRA` bit is set, an "extra field" is present in the header, with total length XLEN bytes. It consists of a series of subfields, each of the form:

     +---+---+---+---+==================================+
     |SI1|SI2|  LEN  |... LEN bytes of subfield data ...|
     +---+---+---+---+==================================+

The reserved IDs are:

     SI1         SI2         Data
     ----------  ----------  ----
     0x41 ('A')  0x70 ('P')  Apollo file type information

Subfield IDs with `SI2 = 0` are reserved for future use.

LEN gives the length of the subfield data, excluding the 4 initial bytes.

See Also:
  - RFC 1952 GZIP File Format Specification

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `getId()`
  The 2 character ISO-8859-1 string made from the si1 and si2 bytes of the sub field id.
  `byte[]`
  `getPayload()`
  The subfield payload.
  `int`
  `hashCode()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### getId

    public String getId()
    The 2 character ISO-8859-1 string made from the si1 and si2 bytes of the sub field id.
    Returns:
      Two character ID.

  - ### getPayload

    public byte[] getPayload()
    The subfield payload.
    Returns:
      The payload.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`