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)
FilterOutputStreampublic void write(byte b)
throws java.io.IOException
java.io.IOExceptionFilterOutputStreampublic void write(byte[] b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionFilterOutputStreampublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionFilterOutputStreampublic void finalizeStream()
throws java.io.IOException
FinalizablefinalizeStream in interface Finalizablejava.io.IOException - In case of an IO problemFinalizablepublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOExceptionFilterOutputStream