Top Description Fields Constructors Methods
org.apache.pdfbox.cos

public final Class COSInputStream

extends FilterInputStream
Class Inheritance
Imports
java.io.FilterInputStream, .IOException, .InputStream, java.util.ArrayList, .Collections, .List, org.apache.pdfbox.filter.DecodeOptions, .DecodeResult, .Filter, org.apache.pdfbox.io.RandomAccessInputStream, .RandomAccessRead

An InputStream which reads from an encoded COS stream.
Author
John Hewson

Field Summary

Modifier and TypeField and Description
private final List<DecodeResult>
Inherited from java.io.FilterInputStream:
in

Constructor Summary

AccessConstructor and Description
private
COSInputStream(InputStream
decoded stream
input
,
List<DecodeResult>
results of decoding
decodeResults
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
pack-priv static COSInputStream

Returns:

Decoded stream.
create
(List<Filter>
Filters to be applied.
filters
,
COSDictionary
Filter parameters.
parameters
,
InputStream
Encoded input stream.
in
)

Creates a new COSInputStream from an encoded input stream.

pack-priv static COSInputStream

Returns:

Decoded stream.
create
(List<Filter>
Filters to be applied.
filters
,
COSDictionary
Filter parameters.
parameters
,
InputStream
Encoded input stream.
in
,
DecodeOptions
decode options for the encoded stream
options
)

Creates a new COSInputStream from an encoded input stream.

public DecodeResult

Returns:

the result of the last filter
getDecodeResult
()

Returns the result of the last filter, for use by repair mechanisms.

Inherited from java.io.FilterInputStream:
availableclosemarkmarkSupportedreadreadreadresetskip

Field Detail

decodeResultsback to summary
private final List<DecodeResult> decodeResults

Constructor Detail

COSInputStreamback to summary
private COSInputStream(InputStream input, List<DecodeResult> decodeResults)

Constructor.

Parameters
input:InputStream

decoded stream

decodeResults:List<DecodeResult>

results of decoding

Method Detail

createback to summary
pack-priv static COSInputStream create(List<Filter> filters, COSDictionary parameters, InputStream in) throws IOException

Creates a new COSInputStream from an encoded input stream.

Parameters
filters:List<Filter>

Filters to be applied.

parameters:COSDictionary

Filter parameters.

in:InputStream

Encoded input stream.

Returns:COSInputStream

Decoded stream.

Exceptions
IOException:
If the stream could not be read.
createback to summary
pack-priv static COSInputStream create(List<Filter> filters, COSDictionary parameters, InputStream in, DecodeOptions options) throws IOException

Creates a new COSInputStream from an encoded input stream.

Parameters
filters:List<Filter>

Filters to be applied.

parameters:COSDictionary

Filter parameters.

in:InputStream

Encoded input stream.

options:DecodeOptions

decode options for the encoded stream

Returns:COSInputStream

Decoded stream.

Exceptions
IOException:
If the stream could not be read.
getDecodeResultback to summary
public DecodeResult getDecodeResult()

Returns the result of the last filter, for use by repair mechanisms.

Returns:DecodeResult

the result of the last filter