commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (COMPRESS-255) BZip2CompressorInputStream does not implement public int available() throws IOException
Date Sun, 28 Jan 2018 11:43:00 GMT

     [ https://issues.apache.org/jira/browse/COMPRESS-255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stefan Bodewig updated COMPRESS-255:
------------------------------------
    Issue Type: Improvement  (was: Bug)

> 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: Improvement
>          Components: Compressors
>    Affects Versions: 1.6
>         Environment: Java
>            Reporter: Kevin Dauch
>            Priority: Major
>              Labels: patch
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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
(v7.6.3#76005)

Mime
View raw message