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

## Class JpegDecoder

- java.lang.Object
- - org.apache.commons.imaging.common.BinaryFileParser
  - - org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder

- All Implemented Interfaces:
    `JpegUtils.Visitor`

      public class JpegDecoder
      extends BinaryFileParser
      implements JpegUtils.Visitor

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JpegDecoder()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `beginSOS()` |
    `BufferedImage` | `decode​(ByteSource byteSource)` |
    `boolean` | `visitSegment​(int marker, byte[] markerBytes, int segmentLength, byte[] segmentLengthBytes, byte[] segmentData)` |
    `void` | `visitSOS​(int marker, byte[] markerBytes, byte[] imageData)` |

    - ### 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, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JpegDecoder

          public JpegDecoder()

  - ### Method Detail

    - #### beginSOS

          public boolean beginSOS()

      Specified by:
        `beginSOS` in interface `JpegUtils.Visitor`

    - #### visitSOS

          public void visitSOS​(int marker,
                               byte[] markerBytes,
                               byte[] imageData)

      Specified by:
        `visitSOS` in interface `JpegUtils.Visitor`

    - #### visitSegment

          public boolean visitSegment​(int marker,
                                      byte[] markerBytes,
                                      int segmentLength,
                                      byte[] segmentLengthBytes,
                                      byte[] segmentData)
                               throws ImageReadException,
                                      IOException

      Specified by:
        `visitSegment` in interface `JpegUtils.Visitor`
      Throws:
        `ImageReadException`
        `IOException`

    - #### decode

          public BufferedImage decode​(ByteSource byteSource)
                               throws IOException,
                                      ImageReadException

      Throws:
        `IOException`
        `ImageReadException`