ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r741618 - /ant/core/trunk/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java
Date Fri, 06 Feb 2009 16:29:39 GMT
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 {



Mime
View raw message