On Mon, Mar 31, 2003 at 12:09:44AM -0500, 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.

Just AND the byte with 0xff.  This should work in either case.

        Scott

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to