|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes a JPEG data stream decoder. This decoder takes an InputStream that contains JPEG encoded image data. The JPEGImageDecoder will decode the JPEG image data according to the parameters set in a JPEGDecodeParam object. The resulting image data is returned in either a Raster or a BufferedImage.
Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.
JPEGCodec
,
JPEGDecodeParam
,
Raster
,
BufferedImage
Method Summary | |
BufferedImage |
decodeAsBufferedImage()
Decodes the current JPEG data stream. |
Raster |
decodeAsRaster()
Decode the JPEG stream that was passed as part of construction. |
InputStream |
getInputStream()
Get the input stream that decoding will occur from. |
JPEGDecodeParam |
getJPEGDecodeParam()
Returns the JPEGDecodeParam object that resulted from the most recent decoding event. |
void |
setJPEGDecodeParam(JPEGDecodeParam jdp)
Sets the JPEGDecodeParam object used to determine the features of the decompression performed on the JPEG encoded data. |
Method Detail |
public JPEGDecodeParam getJPEGDecodeParam()
public void setJPEGDecodeParam(JPEGDecodeParam jdp)
jdp
- JPEGDecodeParam objectpublic InputStream getInputStream()
public Raster decodeAsRaster() throws IOException, ImageFormatException
ImageFormatException
- if irregularities in the JPEG
stream or an unknown condition is encountered.
IOException
public BufferedImage decodeAsBufferedImage() throws IOException, ImageFormatException
ImageFormatException
- if irregularities in the JPEG
stream or an unknown condition is encountered.
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |