6884800: Path.newInputStream does not usefully implement available()

Christopher Hegarty -Sun Microsystems Ireland Christopher.Hegarty at Sun.COM
Tue Sep 29 01:40:33 PDT 2009

Looks fine.

There is of course a minor change in behavior in that these InputStreams 
will now throw ChannelClosedException instead of returning 0, when the 
channel is closed. But I don't expect this will surprise anyone.


Alan Bateman wrote:
> I need a reviewer for this small change.  A long standing issue 
> (4648049) is that the InputStream returned by 
> Channels.newInputStream(ReadableByteChannel) doesn't usefully implement 
> the available method. 6884800 is the case where the channel is to the 
> file, a case where available can be easily implemented. The webrev is here:
>  http://cr.openjdk.java.net/~alanb/6884800/webrev.00/
> Thanks,
> Alan.

More information about the nio-dev mailing list