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

## Class SofnSegment

- java.lang.Object
- - org.apache.commons.imaging.common.BinaryFileParser
  - - org.apache.commons.imaging.formats.jpeg.segments.Segment
    - - org.apache.commons.imaging.formats.jpeg.segments.SofnSegment

-     public class SofnSegment
      extends Segment

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `SofnSegment.Component` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `int` | `height` |
    `int` | `numberOfComponents` |
    `int` | `precision` |
    `int` | `width` |

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

      `length, marker`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SofnSegment.Component[]` | `getComponents()` | Returns a copy of all the components.
    `SofnSegment.Component` | `getComponents​(int index)` | Returns the component at the specified index.
    `String` | `getDescription()` |

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

      `dump, getSegmentType, toString`

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

      `debugNumber, debugNumber, getByteOrder, setByteOrder`

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

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

- - ### Field Detail

    - #### width

          public final int width

    - #### height

          public final int height

    - #### numberOfComponents

          public final int numberOfComponents

    - #### precision

          public final int precision

  - ### Constructor Detail

    - #### SofnSegment

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

      Throws:
        `IOException`
        `ImageReadException`

    - #### SofnSegment

          public SofnSegment​(int marker,
                             int markerLength,
                             InputStream is)
                      throws IOException,
                             ImageReadException

      Throws:
        `IOException`
        `ImageReadException`

  - ### Method Detail

    - #### getComponents

          public SofnSegment.Component[] getComponents()

      Returns a copy of all the components.
      Returns:
        the components

    - #### getComponents

          public SofnSegment.Component getComponents​(int index)

      Returns the component at the specified index.
      Parameters:
        `index` - the array index
      Returns:
        the component

    - #### getDescription

          public String getDescription()

      Specified by:
        `getDescription` in class `Segment`