You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2012/05/21 06:24:20 UTC

svn commit: r1340894 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java

Author: bodewig
Date: Mon May 21 04:24:20 2012
New Revision: 1340894

URL: http://svn.apache.org/viewvc?rev=1340894&view=rev
Log:
some comments still mention old Ant class name

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java?rev=1340894&r1=1340893&r2=1340894&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java Mon May 21 04:24:20 2012
@@ -335,7 +335,7 @@ public class BZip2CompressorOutputStream
      *
      * @param inputLength
      *            The length of the data which will be compressed by
-     *            <tt>CBZip2OutputStream</tt>.
+     *            <tt>BZip2CompressorOutputStream</tt>.
      */
     public static int chooseBlockSize(long inputLength) {
         return (inputLength > 0) ? (int) Math
@@ -343,7 +343,7 @@ public class BZip2CompressorOutputStream
     }
 
     /**
-     * Constructs a new <tt>CBZip2OutputStream</tt> with a blocksize of 900k.
+     * Constructs a new <tt>BZip2CompressorOutputStream</tt> with a blocksize of 900k.
      *
      * @param out 
      *            the destination stream.
@@ -359,7 +359,7 @@ public class BZip2CompressorOutputStream
     }
 
     /**
-     * Constructs a new <tt>CBZip2OutputStream</tt> with specified blocksize.
+     * Constructs a new <tt>BZip2CompressorOutputStream</tt> with specified blocksize.
      *
      * @param out
      *            the destination stream.
@@ -391,8 +391,6 @@ public class BZip2CompressorOutputStream
         }
 
         this.blockSize100k = blockSize;
-        /* 20 is just a paranoia constant */
-        this.allowableBlockSize = (this.blockSize100k * BZip2Constants.BASEBLOCKSIZE) - 20;
         this.out = out;
         init();
     }
@@ -549,6 +547,9 @@ public class BZip2CompressorOutputStream
         for (int i = 256; --i >= 0;) {
             inUse[i] = false;
         }
+
+        /* 20 is just a paranoia constant */
+        this.allowableBlockSize = (this.blockSize100k * BZip2Constants.BASEBLOCKSIZE) - 20;
     }
 
     private void endBlock() throws IOException {