You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Stefan Bodewig (Jira)" <ji...@apache.org> on 2019/09/07 17:11:00 UTC

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

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

Stefan Bodewig resolved COMPRESS-255.
-------------------------------------
    Resolution: Not A Problem

> 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
(v8.3.2#803003)