public static long parseBE4BytesAsUnsigned ( byte [ ] data , int offset ) { long value = ( ( long ) ( data [ offset + 0 ] & 0xFF ) << 24 ) | ( ( long ) ( data [ offset + 1 ] & 0xFF ) << 16 ) | ( ( long ) ( data [ offset + 2 ] & 0xFF ) << 8 ) | ( ( long ) ( data [ offset + 3 ] & 0xFF ) << 0 ) ; return value ; }
Parse 4 bytes in big endian byte order as an unsigned integer .