Class RunLengthEncodeOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.xmlgraphics.util.io.RunLengthEncodeOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, Finalizable
This class applies a RunLengthEncode filter to the stream.
- Version:
- $Id$ Originally authored by Stephen Wolke.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate intprivate static final intprivate static final intprivate static final intprivate byte[]private intprivate static final intFields inherited from class FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidThis 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.voidwrite(byte b) voidwrite(byte[] b) voidwrite(byte[] b, int off, int len) Methods inherited from class FilterOutputStream
flush, writeMethods inherited from class OutputStream
nullOutputStream
-
Field Details
-
MAX_SEQUENCE_COUNT
private static final int MAX_SEQUENCE_COUNT- See Also:
-
END_OF_DATA
private static final int END_OF_DATA- See Also:
-
BYTE_MAX
private static final int BYTE_MAX- See Also:
-
NOT_IDENTIFY_SEQUENCE
private static final int NOT_IDENTIFY_SEQUENCE- See Also:
-
START_SEQUENCE
private static final int START_SEQUENCE- See Also:
-
IN_SEQUENCE
private static final int IN_SEQUENCE- See Also:
-
NOT_IN_SEQUENCE
private static final int NOT_IN_SEQUENCE- See Also:
-
runCount
private int runCount -
isSequence
private int isSequence -
runBuffer
private byte[] runBuffer
-
-
Constructor Details
-
RunLengthEncodeOutputStream
- See Also:
-
-
Method Details
-
write
- Throws:
IOException- See Also:
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException- See Also:
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException- See Also:
-
finalizeStream
Description copied from interface:FinalizableThis 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.- Specified by:
finalizeStreamin interfaceFinalizable- Throws:
IOException- In case of an IO problem- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException- See Also:
-