CCITT Fax writer: fill should only add bits if byte is not empty

This commit is contained in:
Schmidor 2015-10-11 16:34:37 +02:00
parent 237079bcc9
commit 6c702c447b

View File

@ -315,7 +315,6 @@ public class CCITTFaxEncoderStream extends OutputStream {
clearOutputBuffer(); clearOutputBuffer();
} }
} }
System.err.println("");
} }
private void writeEOL() throws IOException { private void writeEOL() throws IOException {
@ -329,7 +328,9 @@ public class CCITTFaxEncoderStream extends OutputStream {
} }
private void fill() throws IOException { private void fill() throws IOException {
if (outputBufferBitLength != 0) {
stream.write(outputBuffer); stream.write(outputBuffer);
}
clearOutputBuffer(); clearOutputBuffer();
} }