Bug in Channels.newChannel() ?
Alan Bateman
Alan.Bateman at oracle.com
Sun Mar 27 10:16:45 PDT 2011
Rémi Forax wrote:
> :
>
> ByteArrayInputStream input2 = new ByteArrayInputStream(new byte[]
> {1, 2});
> System.out.println(input2.read(new byte[2]));
> System.out.println(input2.read(new byte[0]));
>
> prints 2 and -1.
As it happens I submitted a bug against java.io.ByteArrayInputStream
some time ago on this:
http://bugs.sun.com/view_bug.do?bug_id=6766844
I'd forgotten about that one.
-Alan.
More information about the nio-dev
mailing list