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 int
private int[]
private int
private final int
private int
private int
private final int
private final byte[]
private final int
private byte
private byte
private final int
private final OutputStream
private 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 void
void
close()
private void
encode2D()
private void
private void
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) 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:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in 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()
-