Package org.apache.pdfbox.cos
Class COSInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.pdfbox.cos.COSInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An InputStream which reads from an encoded COS stream.
-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
COSInputStream
(InputStream input, List<DecodeResult> decodeResults) Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) static COSInputStream
create
(List<Filter> filters, COSDictionary parameters, InputStream in, ScratchFile scratchFile) Creates a new COSInputStream from an encoded input stream.(package private) static COSInputStream
create
(List<Filter> filters, COSDictionary parameters, InputStream in, ScratchFile scratchFile, DecodeOptions options) 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
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
decodeResults
-
-
Constructor Details
-
COSInputStream
Constructor.- Parameters:
input
- decoded streamdecodeResults
- results of decoding
-
-
Method Details
-
create
static COSInputStream create(List<Filter> filters, COSDictionary parameters, InputStream in, ScratchFile scratchFile) throws 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:
IOException
- If the stream could not be read.
-
create
static COSInputStream create(List<Filter> filters, COSDictionary parameters, InputStream in, ScratchFile scratchFile, DecodeOptions options) throws IOException - Throws:
IOException
-
getDecodeResult
Returns the result of the last filter, for use by repair mechanisms.- Returns:
- the result of the decoding.
-