org.freehep.util.io
Class RunLengthOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.freehep.util.io.RunLengthOutputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable, FinishableOutputStream, RunLength
public class RunLengthOutputStream extends java.io.FilterOutputStream implements RunLength, FinishableOutputStream
The RunLengthOutputStream encodes data as Run Length encoding. The exact definition of Run Length encoding can be found in the PostScript Language Reference (3rd ed.) chapter 3.13.3.
-
-
Constructor Summary
Constructors Constructor and Description RunLengthOutputStream(java.io.OutputStream out)Create a Run Length output stream
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()voidfinish()Finishes the current outputstream (compresses, flushes, caluclates CRC) and writes whatever is left in the buffers, but does not close the stream.voidwrite(int a)
-
-
-
Constructor Detail
-
RunLengthOutputStream
public RunLengthOutputStream(java.io.OutputStream out)
Create a Run Length output stream- Parameters:
out- stream to write
-
-
Method Detail
-
write
public void write(int a) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
finish
public void finish() throws java.io.IOExceptionDescription copied from interface:FinishableOutputStreamFinishes the current outputstream (compresses, flushes, caluclates CRC) and writes whatever is left in the buffers, but does not close the stream.- Specified by:
finishin interfaceFinishableOutputStream- Throws:
java.io.IOException- if write fails
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Overrides:
closein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
-
DMelt 3.0 © DataMelt by jWork.ORG