You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Kevin Dauch (JIRA)" <ji...@apache.org> on 2014/01/16 23:03:21 UTC

[jira] [Created] (COMPRESS-255) BZip2CompressorInputStream does not implement public int available() throws IOException

Kevin Dauch created COMPRESS-255:
------------------------------------

             Summary: BZip2CompressorInputStream does not implement public int available() throws IOException
                 Key: COMPRESS-255
                 URL: https://issues.apache.org/jira/browse/COMPRESS-255
             Project: Commons Compress
          Issue Type: Bug
          Components: Compressors
    Affects Versions: 1.6
         Environment: Java
            Reporter: Kevin Dauch


Here is the patch that I created:
--- src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java	(revision 1550240)
+++ src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java	(working copy)
@@ -147,6 +147,16 @@
         }
     }
 
+    @Override
+    public int available() throws IOException {
+	int avail = 0;
+	if (this.in != null) {
+	    avail = this.in.available();
+	}
+        return avail;
+    }
+
+
     /*
      * (non-Javadoc)
      * 




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)