Top Description Methods
org.apache.pdfbox.contentstream

public Interface PDContentStream

Known Direct Implementers
org.apache.pdfbox.pdmodel.PDPage, org.apache.pdfbox.pdmodel.font.PDType3CharProc, org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject, org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPattern
Imports
java.io.IOException, .InputStream, org.apache.pdfbox.io.RandomAccessRead, org.apache.pdfbox.pdmodel.PDResources, org.apache.pdfbox.pdmodel.common.PDRectangle, org.apache.pdfbox.util.Matrix

A content stream.
Author
John Hewson

Method Summary

Modifier and TypeMethod and Description
public PDRectangle

Returns:

the bounding box of the content stream or null
getBBox
()

Returns the bounding box of the contents.

public InputStream

Returns:

An InputStream or null.
getContents
()

Returns this stream's content, if any.

public RandomAccessRead

Returns:

A RandomAccessRead or null.
getContentsForRandomAccess
()

Returns this stream's content, if any.

public default RandomAccessRead

Returns:

A RandomAccessRead or null.
getContentsForStreamParsing
()

Returns this stream's content, if any.

public Matrix

Returns:

the matrix of the content stream or the identity matrix if there isn't any
getMatrix
()

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

public PDResources

Returns:

the resources of the content stream or null
getResources
()

Returns this stream's resources, if any.

Method Detail

getBBoxback to summary
public PDRectangle getBBox()

Returns the bounding box of the contents.

Returns:PDRectangle

the bounding box of the content stream or null

getContentsback to summary
public InputStream getContents() throws IOException

Returns this stream's content, if any.

Returns:InputStream

An InputStream or null.

Exceptions
IOException:
If the stream could not be read
getContentsForRandomAccessback to summary
public RandomAccessRead getContentsForRandomAccess() throws IOException

Returns this stream's content, if any.

Returns:RandomAccessRead

A RandomAccessRead or null.

Exceptions
IOException:
If the content could not be read
getContentsForStreamParsingback to summary
public default 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:RandomAccessRead

A RandomAccessRead or null.

Exceptions
IOException:
If the content could not be read
getMatrixback to summary
public Matrix getMatrix()

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

Returns:Matrix

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

getResourcesback to summary
public PDResources getResources()

Returns this stream's resources, if any.

Returns:PDResources

the resources of the content stream or null