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
-
-
-
-
Method Detail
-
beginSOS
public boolean beginSOS()
- Specified by:
beginSOS
in interfaceJpegUtils.Visitor
-
visitSOS
public void visitSOS(int marker, byte[] markerBytes, byte[] imageData)
- Specified by:
visitSOS
in interfaceJpegUtils.Visitor
-
visitSegment
public boolean visitSegment(int marker, byte[] markerBytes, int segmentLength, byte[] segmentLengthBytes, byte[] segmentData) throws ImageReadException, IOException
- Specified by:
visitSegment
in interfaceJpegUtils.Visitor
- Throws:
ImageReadException
IOException
-
decode
public BufferedImage decode(ByteSource byteSource) throws IOException, ImageReadException
- Throws:
IOException
ImageReadException
-
-