Package org.apache.pdfbox.cos
Class COSInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.pdfbox.cos.COSInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public final class COSInputStream extends java.io.FilterInputStream
An InputStream which reads from an encoded COS stream.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<DecodeResult>
decodeResults
-
Constructor Summary
Constructors Modifier Constructor Description private
COSInputStream(java.io.InputStream input, java.util.List<DecodeResult> decodeResults)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static COSInputStream
create(java.util.List<Filter> filters, COSDictionary parameters, java.io.InputStream in, ScratchFile scratchFile)
Creates a new COSInputStream from an encoded input stream.(package private) static COSInputStream
create(java.util.List<Filter> filters, COSDictionary parameters, java.io.InputStream in, ScratchFile scratchFile, DecodeOptions options)
DecodeResult
getDecodeResult()
Returns the result of the last filter, for use by repair mechanisms.-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
-
-
-
Field Detail
-
decodeResults
private final java.util.List<DecodeResult> decodeResults
-
-
Constructor Detail
-
COSInputStream
private COSInputStream(java.io.InputStream input, java.util.List<DecodeResult> decodeResults)
Constructor.- Parameters:
input
- decoded streamdecodeResults
- results of decoding
-
-
Method Detail
-
create
static COSInputStream create(java.util.List<Filter> filters, COSDictionary parameters, java.io.InputStream in, ScratchFile scratchFile) throws java.io.IOException
Creates a new COSInputStream from an encoded input stream.- Parameters:
filters
- Filters to be applied.parameters
- Filter parameters.in
- Encoded input stream.scratchFile
- Scratch file to use, or null.- Returns:
- Decoded stream.
- Throws:
java.io.IOException
- If the stream could not be read.
-
create
static COSInputStream create(java.util.List<Filter> filters, COSDictionary parameters, java.io.InputStream in, ScratchFile scratchFile, DecodeOptions options) throws java.io.IOException
- Throws:
java.io.IOException
-
getDecodeResult
public DecodeResult getDecodeResult()
Returns the result of the last filter, for use by repair mechanisms.- Returns:
- the result of the decoding.
-
-