commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Dauch (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COMPRESS-255) BZip2CompressorInputStream does not implement public int available() throws IOException
Date Thu, 16 Jan 2014 22:03:21 GMT
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)

Mime
View raw message