Package com.itextpdf.io.source
Class RunLengthOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.itextpdf.io.source.RunLengthOutputStream
- All Implemented Interfaces:
-
IFinishable,Closeable,Flushable,AutoCloseable
An output stream that encodes data according to the
RunLengthDecode filter from the PDF specification.
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newRunLengthDecodeencoding stream. -
Method Summary
Methods inherited from class java.io.FilterOutputStream
flush, write, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
RunLengthOutputStream
Creates a newRunLengthDecodeencoding stream.- Parameters:
-
out- the output stream to write encoded data to
-
-
Method Details
-
write
- Overrides:
-
writein classFilterOutputStream - Throws:
-
IOException
-
close
- Specified by:
-
closein interfaceAutoCloseable - Specified by:
-
closein interfaceCloseable - Overrides:
-
closein classFilterOutputStream - Throws:
-
IOException
-
finish
Is called to finalize the stream, implementing classes should ensure that the underlying output stream remains open after this method is called.This method completes any pending write operations, flushes internal buffers, writes any final data required by the stream format, and releases resources associated with the stream processing. However, unlike
OutputStream.close(), it does not close the underlying output stream.After calling this method, no further data should be written to this stream, but the underlying stream remains open and can be used for other operations.
This method should be idempotent - calling it multiple times should have the same effect as calling it once.
- Specified by:
-
finishin interfaceIFinishable - Throws:
-
IOException- if an I/O error occurs during finalization
-