public static int getValue ( byte [ ] bytes , int offset ) { int value = ( bytes [ offset + 1 ] << BYTE_1_SHIFT ) & BYTE_1_MASK ; value += ( bytes [ offset ] & BYTE_MASK ) ; return value ; }
Helper method to get the value as a java int from two bytes starting at given array offset