Package org.apache.pdfbox.cos
Class COSOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.pdfbox.cos.COSOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
An OutputStream which writes to an encoded COS stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RandomAccess
private final COSDictionary
private final ScratchFile
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionCOSOutputStream
(List<Filter> filters, COSDictionary parameters, OutputStream output, ScratchFile scratchFile) Creates a new COSOutputStream writes to an encoded COS stream. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
filters
-
parameters
-
scratchFile
-
buffer
-
-
Constructor Details
-
COSOutputStream
COSOutputStream(List<Filter> filters, COSDictionary parameters, OutputStream output, ScratchFile scratchFile) throws IOException Creates a new COSOutputStream writes to an encoded COS stream.- Parameters:
filters
- Filters to apply.parameters
- Filter parameters.output
- Encoded stream.scratchFile
- Scratch file to use.- Throws:
IOException
- If there was an error creating a temporary buffer
-
-
Method Details
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-