public final class COSOutputStream
extends java.io.FilterOutputStream
Modifier and Type | Field and Description |
---|---|
private RandomAccess |
buffer |
private java.util.List<Filter> |
filters |
private COSDictionary |
parameters |
private ScratchFile |
scratchFile |
Constructor and Description |
---|
COSOutputStream(java.util.List<Filter> filters,
COSDictionary parameters,
java.io.OutputStream output,
ScratchFile scratchFile)
Creates a new COSOutputStream writes to an encoded COS stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
private final java.util.List<Filter> filters
private final COSDictionary parameters
private final ScratchFile scratchFile
private RandomAccess buffer
COSOutputStream(java.util.List<Filter> filters, COSDictionary parameters, java.io.OutputStream output, ScratchFile scratchFile) throws java.io.IOException
filters
- Filters to apply.parameters
- Filter parameters.output
- Encoded stream.scratchFile
- Scratch file to use.java.io.IOException
- If there was an error creating a temporary bufferpublic void write(byte[] b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterOutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException