org.apache.pdfbox.contentstream

## Interface PDContentStream

All Known Implementing Classes:
  PDAppearanceStream, PDFormXObject, PDPage, PDTilingPattern, PDTransparencyGroup, PDType3CharProc

    public interface PDContentStream

A content stream.

Author:
  John Hewson

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`PDRectangle` `getBBox()` Returns the bounding box of the contents.
`InputStream` `getContents()` Returns this stream's content, if any.
`org.apache.pdfbox.io.RandomAccessRead` `getContentsForRandomAccess()` Returns this stream's content, if any.
`default org.apache.pdfbox.io.RandomAccessRead` `getContentsForStreamParsing()` Returns this stream's content, if any.
`Matrix` `getMatrix()` Returns the matrix which transforms from the stream's space to user space.
`PDResources` `getResources()` Returns this stream's resources, if any.

### Method Detail

#### getContents

    InputStream getContents()
                     throws IOException

Returns this stream's content, if any.

Returns:
  An InputStream or null.
Throws:
  `IOException` - If the stream could not be read

#### getContentsForRandomAccess

    org.apache.pdfbox.io.RandomAccessRead getContentsForRandomAccess()
                                                              throws IOException

Returns this stream's content, if any.

Returns:
  A RandomAccessRead or null.
Throws:
  `IOException` - If the content could not be read

#### getContentsForStreamParsing

    default org.apache.pdfbox.io.RandomAccessRead getContentsForStreamParsing()
                                                                       throws IOException

Returns this stream's content, if any. The random access capabilities of the returned instance is supposed to be limited. Peek/rewind operations are limited to a small range of data and not the whole set of data. Seek operations aren't supported at all.

Returns:
  A RandomAccessRead or null.
Throws:
  `IOException` - If the content could not be read

#### getResources

    PDResources getResources()

Returns this stream's resources, if any.

Returns:
  the resources of the content stream or null

#### getBBox

    PDRectangle getBBox()

Returns the bounding box of the contents.

Returns:
  the bounding box of the content stream or null

#### getMatrix

    Matrix getMatrix()

Returns the matrix which transforms from the stream's space to user space.

Returns:
  the matrix of the content stream or the identity matrix if there isn't any