code: public final int getInt (int index) {
        int bytes = 0;
        if (order == ByteOrder.BIG_ENDIAN) {
            for (int i = 0; i < 4; i++) {
                bytes = bytes << 8;
                bytes = bytes | (byteArray.get(index + i) & 0xFF);
            }
        } else {
            for (int i = 3; i >= 0; i--) {
                bytes = bytes << 8;
                bytes = bytes | (byteArray.get(index + i) & 0xFF);
            }
        }
        return bytes;
      }
docs: Returns the int at the specified index.
  <p> The 4 bytes starting at the specified index are composed into a int according to the
  current byte order and returned. The position is not changed. </p>
  
  @param index the index, must not be negative and equal or less than {@code limit - 4}.
  @return the int at the specified index.
  @exception IndexOutOfBoundsException if {@code index} is invalid.