final class CCITTFaxEncoderStream
extends java.io.OutputStream
Modifier and Type | Class and Description |
---|---|
private static class |
CCITTFaxEncoderStream.Code |
Modifier and Type | Field and Description |
---|---|
private static CCITTFaxEncoderStream.Code[] |
BLACK_NONTERMINATING_CODES |
private static CCITTFaxEncoderStream.Code[] |
BLACK_TERMINATING_CODES |
private int[] |
changesCurrentRow |
private int |
changesCurrentRowLength |
private int[] |
changesReferenceRow |
private int |
changesReferenceRowLength |
private int |
columns |
private int |
currentBufferLength |
private int |
currentRow |
private int |
fillOrder |
private byte[] |
inputBuffer |
private int |
inputBufferLength |
private byte |
outputBuffer |
private byte |
outputBufferBitLength |
private int |
rows |
private java.io.OutputStream |
stream |
private static CCITTFaxEncoderStream.Code[] |
WHITE_NONTERMINATING_CODES |
private static CCITTFaxEncoderStream.Code[] |
WHITE_TERMINATING_CODES |
Constructor and Description |
---|
CCITTFaxEncoderStream(java.io.OutputStream stream,
int columns,
int rows,
int fillOrder) |
Modifier and Type | Method and Description |
---|---|
private void |
clearOutputBuffer() |
void |
close() |
private void |
encode2D() |
private void |
encodeRow() |
private void |
encodeRowType6() |
private void |
fill() |
void |
flush() |
private int[] |
getNextChanges(int pos,
boolean white) |
private int[] |
getNextRefChanges(int a0,
boolean white) |
void |
write(int b) |
private void |
write(int code,
int codeLength) |
private void |
writeEOL() |
private void |
writeRun(int runLength,
boolean white) |
private int currentBufferLength
private final byte[] inputBuffer
private final int inputBufferLength
private final int columns
private final int rows
private int[] changesCurrentRow
private int[] changesReferenceRow
private int currentRow
private int changesCurrentRowLength
private int changesReferenceRowLength
private byte outputBuffer
private byte outputBufferBitLength
private final int fillOrder
private final java.io.OutputStream stream
private static final CCITTFaxEncoderStream.Code[] WHITE_TERMINATING_CODES
private static final CCITTFaxEncoderStream.Code[] WHITE_NONTERMINATING_CODES
private static final CCITTFaxEncoderStream.Code[] BLACK_TERMINATING_CODES
private static final CCITTFaxEncoderStream.Code[] BLACK_NONTERMINATING_CODES
CCITTFaxEncoderStream(java.io.OutputStream stream, int columns, int rows, int fillOrder)
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
private void encodeRow() throws java.io.IOException
java.io.IOException
private void encodeRowType6() throws java.io.IOException
java.io.IOException
private int[] getNextChanges(int pos, boolean white)
private void writeRun(int runLength, boolean white) throws java.io.IOException
java.io.IOException
private void encode2D() throws java.io.IOException
java.io.IOException
private int[] getNextRefChanges(int a0, boolean white)
private void write(int code, int codeLength) throws java.io.IOException
java.io.IOException
private void writeEOL() throws java.io.IOException
java.io.IOException
private void fill() throws java.io.IOException
java.io.IOException
private void clearOutputBuffer()