Class CCITTFaxEncoderStream
java.lang.Object
java.io.OutputStream
com.twelvemonkeys.imageio.plugins.tiff.CCITTFaxEncoderStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
CCITT Modified Huffman RLE, Group 3 (T4) and Group 4 (T6) fax compression.
- Version:
- $Id$
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CCITTFaxEncoderStream.Code[]static final CCITTFaxEncoderStream.Code[]private int[]private intprivate int[]private intprivate intprivate intprivate intprivate intprivate final byte[]private final intprivate booleanprivate booleanprivate booleanprivate byteprivate byteprivate intprivate OutputStreamprivate intstatic final CCITTFaxEncoderStream.Code[]static final CCITTFaxEncoderStream.Code[] -
Constructor Summary
ConstructorsConstructorDescriptionCCITTFaxEncoderStream(OutputStream stream, int columns, int rows, int type, int fillOrder, long options) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidclose()private voidencode1D()private voidencode2D()private voidprivate voidprivate voidprivate voidprivate voidfill()voidflush()private int[]getNextChanges(int pos, boolean white) private int[]getNextRefChanges(int a0, boolean white) voidwrite(int b) private voidwrite(int code, int codeLength) private voidwriteEOL()private voidwriteRun(int runLength, boolean white) Methods inherited from class OutputStream
nullOutputStream, write, write
-
Field Details
-
currentBufferLength
private int currentBufferLength -
inputBuffer
private final byte[] inputBuffer -
inputBufferLength
private final int inputBufferLength -
columns
private int columns -
rows
private int rows -
changesCurrentRow
private int[] changesCurrentRow -
changesReferenceRow
private int[] changesReferenceRow -
currentRow
private int currentRow -
changesCurrentRowLength
private int changesCurrentRowLength -
changesReferenceRowLength
private int changesReferenceRowLength -
outputBuffer
private byte outputBuffer -
outputBufferBitLength
private byte outputBufferBitLength -
type
private int type -
fillOrder
private int fillOrder -
optionG32D
private boolean optionG32D -
optionG3Fill
private boolean optionG3Fill -
optionUncompressed
private boolean optionUncompressed -
stream
-
WHITE_TERMINATING_CODES
-
WHITE_NONTERMINATING_CODES
-
BLACK_TERMINATING_CODES
-
BLACK_NONTERMINATING_CODES
-
-
Constructor Details
-
CCITTFaxEncoderStream
public CCITTFaxEncoderStream(OutputStream stream, int columns, int rows, int type, int fillOrder, long options)
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
encodeRow
- Throws:
IOException
-
encodeRowType2
- Throws:
IOException
-
encodeRowType4
- Throws:
IOException
-
encodeRowType6
- Throws:
IOException
-
encode1D
- Throws:
IOException
-
getNextChanges
private int[] getNextChanges(int pos, boolean white) -
writeRun
- Throws:
IOException
-
encode2D
- Throws:
IOException
-
getNextRefChanges
private int[] getNextRefChanges(int a0, boolean white) -
write
- Throws:
IOException
-
writeEOL
- Throws:
IOException
-
fill
- Throws:
IOException
-
clearOutputBuffer
private void clearOutputBuffer()
-