Tuesday, July 6, 2010

Reading byte in Java

firstByte = (0x000000FF & ((int)buf[index]));

Reference:
http://www.darksleep.com/player/JavaAndUnsignedTypes.html

Java Operator
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html

Bitwise operation: http://en.wikipedia.org/wiki/Bitwise_operation
shift: << >> >>>
bitwise inclusive OR: |
bitwise AND: &

No comments:

Post a Comment