code: public synchronized XEvent get(int index) throws IndexOutOfBoundsException,
  			IOException {
  		if (index < 0 || index >= size) {
  			throw new IndexOutOfBoundsException();
  		}
  		int bufferIndex = index;
  		// correct buffer index from overflow
  		for (int i = 0; i < overflowSize; i++) {
  			if (overflowIndices[i] == index) {
  				return overflowEntries[i];
  			} else if (overflowIndices[i] < index) {
  				bufferIndex--;
  			} else {
  				break;
  			}
  		}
  		// determine deleted offset
  		// step over flagged indices and adjust buffer index upwards
  		// respectively
  		for (int hole = holeFlags.nextSetBit(0); hole >= 0
  				&& hole <= bufferIndex; hole = holeFlags.nextSetBit(hole + 1)) {
  			bufferIndex++;
  		}
  		// buffer index should now point to the corresponding index
  		// within the file buffer, so return it
  		return buffer.get(bufferIndex);
  	}
docs: Retrieves an event at a specific index in the list.
  
  @param index
  Index of the required event in the list.
  @return The requested event.