The bitwise operations are being performed correctly. You are probably expecting unsigned values in your time, but 'byte' is a signed integer. The bytes that have a '1' in the MSB are treated as negative numbers.
You could store the bytes in a short or int.
Joined: Aug 15, 2004
The only problem with this is it has to go into a ByteBuffer. I guess I could store it into a ShortBuffer though.
Edit: Yeah, I need a ByteBuffer so I need an array of bytes.