You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2009/02/06 17:29:39 UTC
svn commit: r741618 -
/ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
Author: bodewig
Date: Fri Feb 6 16:29:39 2009
New Revision: 741618
URL: http://svn.apache.org/viewvc?rev=741618&view=rev
Log:
provide a finish method separate from close - merge from commons-compress, this time merging the correct revision
Modified:
ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
Modified: ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java?rev=741618&r1=741617&r2=741618&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java Fri Feb 6 16:29:39 2009
@@ -381,6 +381,16 @@
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 @@
currentChar = -1;
endBlock();
endCompression();
- closed = true;
- super.close();
- bsStream.close();
}
public void flush() throws IOException {