code: static int getInt(byte[] buffer, int offset) {
          return buffer[offset] << 24 | (buffer[offset + 1] & 0xff) << 16 | (buffer[offset + 2] & 0xff) << 8
                  | (buffer[offset + 3] & 0xff);
      }
docs: Converts four bytes of a byte array to a signed int.
  <p/>
  The byte order is big-endian.
  
  @param buffer the byte array.
  @param offset the offset in the array.
  @return the int value.