public static int bytes2int ( final byte [ ] b , final int offset ) { return ( b [ offset ] ) << 24 | ( 0xff & b [ offset + 1 ] ) << 16 | ( 0xff & b [ offset + 2 ] ) << 8 | ( ( 0xff & b [ offset + 3 ] ) ) ; }
Convert the byte array to an int starting from the given offset .