Package org.apache.commons.imaging.formats.jpeg.segments

## Class App2Segment

- java.lang.Object
- - org.apache.commons.imaging.common.BinaryFileParser
  - - org.apache.commons.imaging.formats.jpeg.segments.Segment
    - - org.apache.commons.imaging.formats.jpeg.segments.GenericSegment
      - - org.apache.commons.imaging.formats.jpeg.segments.AppnSegment
        - - org.apache.commons.imaging.formats.jpeg.segments.App2Segment

- All Implemented Interfaces:
    `Comparable<App2Segment>`

      public class App2Segment
      extends AppnSegment
      implements Comparable<App2Segment>

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `int` | `curMarker` |
    `int` | `numMarkers` |

    - ### Fields inherited from class org.apache.commons.imaging.formats.jpeg.segments.Segment

      `length, marker`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `App2Segment​(int marker, byte[] segmentData)` |
    `App2Segment​(int marker, int markerLength, InputStream is2)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compareTo​(App2Segment other)` |
    `boolean` | `equals​(Object obj)` |
    `byte[]` | `getIccBytes()` |
    `int` | `hashCode()` |

    - ### Methods inherited from class org.apache.commons.imaging.formats.jpeg.segments.AppnSegment

      `getDescription`

    - ### Methods inherited from class org.apache.commons.imaging.formats.jpeg.segments.GenericSegment

      `dump, dump, getSegmentData, getSegmentData, getSegmentDataAsString`

    - ### Methods inherited from class org.apache.commons.imaging.formats.jpeg.segments.Segment

      `getSegmentType, toString`

    - ### Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser

      `debugNumber, debugNumber, getByteOrder, setByteOrder`

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

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

- - ### Field Detail

    - #### curMarker

          public final int curMarker

    - #### numMarkers

          public final int numMarkers

  - ### Constructor Detail

    - #### App2Segment

          public App2Segment​(int marker,
                             byte[] segmentData)
                      throws ImageReadException,
                             IOException

      Throws:
        `ImageReadException`
        `IOException`

    - #### App2Segment

          public App2Segment​(int marker,
                             int markerLength,
                             InputStream is2)
                      throws ImageReadException,
                             IOException

      Throws:
        `ImageReadException`
        `IOException`

  - ### Method Detail

    - #### equals

          public boolean equals​(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### compareTo

          public int compareTo​(App2Segment other)

      Specified by:
        `compareTo` in interface `Comparable<App2Segment>`

    - #### getIccBytes

          public byte[] getIccBytes()

      Returns:
        the iccBytes