You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2007/02/14 18:09:29 UTC

Re: svn commit: r505890 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/AutoCloseInputStream.java src/test/org/apache/commons/httpclient/TestStreams.java

On Wed, 2007-02-14 at 16:47 +1300, simon.kitching@xtra.co.nz wrote:
> Perhaps this should have an @since tag added, as it's a new method?

Hi Simon,

This change does not actually affect the public API.
AutoCloseInputStream is a package private class and is not meant to be
imported by the end users. 

Can we live without an @since for this method?

Oleg

> 
> ---- rolandw@apache.org wrote: 
> > Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/AutoCloseInputStream.java
> > URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/AutoCloseInputStream.java?view=diff&rev=505890&r1=505889&r2=505890
> > ==============================================================================
> > --- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/AutoCloseInputStream.java (original)
> > +++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/AutoCloseInputStream.java Sun Feb 11 03:25:25 2007
> > @@ -131,6 +131,23 @@
> >      }
> >  
> >      /**
> > +     * Obtains the number of bytes that can be read without blocking.
> > +     *
> > +     * @return  the number of bytes available without blocking
> > +     * @throws IOException in case of a problem
> > +     */
> > +    public int available() throws IOException {
> > +        int a = 0; // not -1
> > +
> > +        if (isReadAllowed()) {
> > +            a = super.available();
> > +            // no checkClose() here, available() can't trigger EOF
> > +        }
> > +
> > +        return a;
> > +    }
> > +
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org