public class RunLengthEncodeOutputStream extends java.io.FilterOutputStream implements Finalizable
Modifier and Type | Field and Description |
---|---|
private static int |
BYTE_MAX |
private static int |
END_OF_DATA |
private static int |
IN_SEQUENCE |
private int |
isSequence |
private static int |
MAX_SEQUENCE_COUNT |
private static int |
NOT_IDENTIFY_SEQUENCE |
private static int |
NOT_IN_SEQUENCE |
private byte[] |
runBuffer |
private int |
runCount |
private static int |
START_SEQUENCE |
Constructor and Description |
---|
RunLengthEncodeOutputStream(java.io.OutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finalizeStream()
This method can be called instead of close() on a subclass of
FilteredOutputStream when a final marker has to be written to the target
stream, but close() cannot be called.
|
void |
write(byte b) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
private static final int MAX_SEQUENCE_COUNT
private static final int END_OF_DATA
private static final int BYTE_MAX
private static final int NOT_IDENTIFY_SEQUENCE
private static final int START_SEQUENCE
private static final int IN_SEQUENCE
private static final int NOT_IN_SEQUENCE
private int runCount
private int isSequence
private byte[] runBuffer
public RunLengthEncodeOutputStream(java.io.OutputStream out)
FilterOutputStream
public void write(byte b) throws java.io.IOException
java.io.IOException
FilterOutputStream
public void write(byte[] b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
FilterOutputStream
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
FilterOutputStream
public void finalizeStream() throws java.io.IOException
Finalizable
finalizeStream
in interface Finalizable
java.io.IOException
- In case of an IO problemFinalizable
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
FilterOutputStream