Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.graphics.xobject
Class PDCcitt

    java.lang.Object
      org.pdfbox.pdmodel.graphics.xobject.PDXObject
          org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
              org.pdfbox.pdmodel.graphics.xobject.PDCcitt

All Implemented Interfaces:
  COSObjectable

public class PDCcitt
extends PDXObjectImage

An image class for CCITT Fax.

Version:
  $Revision: 1.4 $
Author:
  Ben Litchfield, paul king

Field Summary

Fields inherited from class org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
`SUB_TYPE`

Constructor Summary
`PDCcitt(PDDocument doc, RandomAccess raf)` Construct from a tiff file.
`PDCcitt(PDStream ccitt)` Standard constructor.

Method Summary
`BufferedImage` | `getRGBImage()` Returns an image of the CCITT Fax, or null if TIFFs are not supported.
`void` | `write2OutputStream(OutputStream out)` This writes a tiff to out.

Methods inherited from class org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage
`getBitsPerComponent, getColorSpace, getHeight, getSuffix, getWidth, setBitsPerComponent, setColorSpace, setHeight, setWidth, write2file`

Methods inherited from class org.pdfbox.pdmodel.graphics.xobject.PDXObject
`createXObject, getCOSObject, getCOSStream, getMetadata, getPDStream, setMetadata`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PDCcitt

    public PDCcitt(PDStream ccitt)

  Standard constructor.

Parameters:
  `ccitt` - The PDStream that already contains all ccitt information.

### PDCcitt

    public PDCcitt(PDDocument doc,
                   RandomAccess raf)
            throws IOException

  Construct from a tiff file.

Parameters:
  `doc` - The document to create the image as part of.
  `raf` - The random access TIFF file which contains a suitable CCITT compressed image
Throws:
  `IOException` - If there is an error reading the tiff data.

Method Detail

### getRGBImage

    public BufferedImage getRGBImage()
                              throws IOException

  Returns an image of the CCITT Fax, or null if TIFFs are not supported. (Requires additional JAI Image filters ) Returns an java.awt.Image, that can be used for display etc.

  Specified by:
    `getRGBImage` in class `PDXObjectImage`
  Returns:
    This PDF object as an AWT image.
  Throws:
    `IOException` - If there is an error creating the image.

### write2OutputStream

    public void write2OutputStream(OutputStream out)
                            throws IOException

  This writes a tiff to out. Writes the Image 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD