core/src/main/java/com/orientechnologies/orient/core/serialization/OBinaryProtocol.java
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]));
  }
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]));
  }
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.

@param b      The byte array
@param offset The array offset
@return The integer
Convert the byte array to an int starting from the given offset .