private OffsetIndex createIndex(SegmentDescriptor descriptor){
  return new DelegatingOffsetIndex(HeapBuffer.allocate(Math.min(DEFAULT_BUFFER_SIZE,descriptor.maxEntries()),OffsetIndex.size(descriptor.maxEntries())));
}

private OffsetIndex createIndex ( SegmentDescriptor descriptor ) { return new DelegatingOffsetIndex ( HeapBuffer . allocate ( Math . min ( DEFAULT_BUFFER_SIZE , descriptor . maxEntries ( ) ) , OffsetIndex . size ( descriptor . maxEntries ( ) ) ) ) ; }
creates an in memory segment index .
