Browse Source

provide a finish method separate from close - merge from commons-compress, this time merging the correct revision

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@741618 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
7d2c3a1c0f
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      src/main/org/apache/tools/bzip2/CBZip2OutputStream.java

+ 10
- 3
src/main/org/apache/tools/bzip2/CBZip2OutputStream.java View File

@@ -381,6 +381,16 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
if (closed) {
return;
}
finish();
super.close();
bsStream.close();
closed = true;
}
protected void finish() throws IOException {
if (closed) {
return;
}

if (runLength > 0) {
writeRun();
@@ -388,9 +398,6 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants {
currentChar = -1;
endBlock();
endCompression();
closed = true;
super.close();
bsStream.close();
}

public void flush() throws IOException {


Loading…
Cancel
Save