Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.graphics.xobject » [javadoc | source]
org.apache.pdfbox.pdmodel.graphics.xobject
public class: PDJpeg [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject
      org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
         org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg

All Implemented Interfaces:
    COSObjectable

An image class for JPegs.
Fields inherited from org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage:
SUB_TYPE
Constructor:
 public PDJpeg(PDStream jpeg) 
    Standard constructor.
    Parameters:
    jpeg - The COSStream from which to extract the JPeg
 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.
 public PDJpeg(PDDocument doc,
    BufferedImage bi) throws IOException 
    Construct from a buffered image.
    Parameters:
    doc - The document to create the image as part of.
    bi - The image to convert to a jpeg
    Throws:
    IOException - If there is an error processing the jpeg data.
Method from org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg Summary:
getBytesFromFile,   getRGBImage,   write2OutputStream
Methods from org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage:
getBitsPerComponent,   getColorSpace,   getHeight,   getImageMask,   getRGBImage,   getSuffix,   getWidth,   setBitsPerComponent,   setColorSpace,   setGraphicsState,   setHeight,   setWidth,   write2OutputStream,   write2file,   write2file
Methods from org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject:
createXObject,   getCOSObject,   getCOSStream,   getMetadata,   getPDStream,   setMetadata
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg Detail:
 public static byte[] getBytesFromFile(File file) throws IOException 
    Returns the given file as byte array.
 public BufferedImage getRGBImage() throws IOException 
    Returns an image of the JPeg, or null if JPegs are not supported. (They should be. ) {@inheritDoc}
 public  void write2OutputStream(OutputStream out) throws IOException 
    This writes the JPeg to out. {@inheritDoc}