Package org.apache.pdfbox.filter
Class CCITTFaxEncoderStream
java.lang.Object
java.io.OutputStream
org.apache.pdfbox.filter.CCITTFaxEncoderStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
CCITT Modified Group 4 (T6) fax compression.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final CCITTFaxEncoderStream.Code[]private static final CCITTFaxEncoderStream.Code[]private int[]private intprivate int[]private intprivate final intprivate intprivate intprivate final intprivate final byte[]private final intprivate byteprivate byteprivate final intprivate final OutputStreamprivate static final CCITTFaxEncoderStream.Code[]private static final CCITTFaxEncoderStream.Code[] -
Constructor Summary
ConstructorsConstructorDescriptionCCITTFaxEncoderStream(OutputStream stream, int columns, int rows, int fillOrder) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidclose()private voidencode2D()private 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 java.io.OutputStream
nullOutputStream, write, write
-
Field Details
-
currentBufferLength
private int currentBufferLength -
inputBuffer
private final byte[] inputBuffer -
inputBufferLength
private final int inputBufferLength -
columns
private final int columns -
rows
private final 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 -
fillOrder
private final int fillOrder -
stream
-
WHITE_TERMINATING_CODES
-
WHITE_NONTERMINATING_CODES
-
BLACK_TERMINATING_CODES
-
BLACK_NONTERMINATING_CODES
-
-
Constructor Details
-
CCITTFaxEncoderStream
CCITTFaxEncoderStream(OutputStream stream, int columns, int rows, int fillOrder)
-
-
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
-
encodeRowType6
- 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()
-