public int segmentIndex(int slotIndex) throws IOException {
      Objects.checkIndex(slotIndex, segmentTableSize());
      return Short.toUnsignedInt(headerBuffer.getShort(SEGMENTS_TABLE_OFFSET + slotIndex * Short.BYTES));
    }
public int segmentIndex(int slotIndex)