On Mon, Mar 31, 2003, Zlatin Balevsky wrote:
> well, I discovered two huge bugs in the java.nio package. The first one
> I mailed to Matthew and it is that the read() reads bytes as signed
> octets even though in the javadocs it explicitly says the values
> InputStream.read() returns ranges 0-255. So for example 0xfb is -5, not
> 251. This will require severe workarounds in the
> authentication/handshaking code, but is doable.


I was looking at the workarounds committed last night and I started to wonder:

How do you distinguish between a 255 (0xff) data byte and an end-of-stream (-1)?

Yves <[EMAIL PROTECTED]>

_______________________________________________
devl mailing list
[EMAIL PROTECTED]
http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl

Reply via email to