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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20030331/796f88e2/attachment.pgp>