Aeloria Resa schrieb:
>
> Hrm, I was browsing through the Base64 code for Fred, and I found
> something kind of odd. It does a bitwise and against an integer, but the
> mask is 0xFF. Meaning, it does absolutely nothing. (Unless I'm simply
> completely asleep. My weak point is bitwise operations, so..)
bytes are signed in java. So casing 0x80 to int gives 0xFFFFFF80.
> <snippet>
> in[x] = 0b11101110
>
> castedX = (int) in[x]
> // castedX is now == 00000000 00000000 00000000 11101110
11111111 11111111 11111111 11101110
HTH.
mihi
_______________________________________________
devl mailing list
[EMAIL PROTECTED]
http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl