org.pdfbox.pdmodel.graphics.xobject
Class PDJpeg
java.lang.Object
org.pdfbox.pdmodel.graphics.xobject.PDXObject
org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
org.pdfbox.pdmodel.graphics.xobject.PDJpeg
- All Implemented Interfaces:
- COSObjectable
- public class PDJpeg
- extends PDXObjectImage
An image class for JPegs.
- Version:
- $Revision: 1.2 $
- Author:
- mathiak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDJpeg
public PDJpeg(PDStream jpeg)
- Standard constructor.
- Parameters:
jpeg
- The COSStream from which to extract the JPeg
PDJpeg
public PDJpeg(PDDocument doc,
InputStream is)
throws IOException
- Construct from a stream.
- Parameters:
doc
- The document to create the image as part of.is
- The stream that contains the jpeg data.
- Throws:
IOException
- If there is an error reading the jpeg data.
getRGBImage
public BufferedImage getRGBImage()
throws IOException
- Returns an image of the JPeg, or null if JPegs are not supported. (They should be. )
- Specified by:
getRGBImage
in class PDXObjectImage
- Returns:
- This PDF object as an AWT image.
- Throws:
IOException
- If there is an error creating the image.- See Also:
PDXObjectImage.getRGBImage()
write2OutputStream
public void write2OutputStream(OutputStream out)
throws IOException
- This writes the JPeg to out.
- Specified by:
write2OutputStream
in class PDXObjectImage
- Parameters:
out
- the OutputStream that the Image is written to.
- Throws:
IOException
- when somethings wrong with out- See Also:
PDXObjectImage.write2OutputStream(java.io.OutputStream)