only flush if there is something to flush
This commit is contained in:
parent
11c55185e8
commit
8f7a8dabc1
|
@ -34,7 +34,9 @@
|
|||
<RunnerSettings RunnerId="Profile ">
|
||||
<option name="myExternalizedOptions" value=" additional-options2=onexit\=snapshot " />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -82,7 +82,9 @@ public class LZFOutputStream extends OutputStream {
|
|||
* Compress and write the current block to the OutputStream
|
||||
*/
|
||||
private void writeCompressedBlock() throws IOException {
|
||||
if (position > 0) {
|
||||
encoder.encodeChunk(outputStream, outputBuffer, 0, position);
|
||||
position = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,9 @@ public class LZFStreamOutput extends StreamOutput {
|
|||
* Compress and write the current block to the OutputStream
|
||||
*/
|
||||
private void writeCompressedBlock() throws IOException {
|
||||
if (position > 0) {
|
||||
encoder.encodeChunk(out, outputBuffer, 0, position);
|
||||
position = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue