code: private Segment loadDiskSegment(long segmentId, long segmentVersion) {
      File file = SegmentFile.createSegmentFile(name, storage.directory(), segmentId, segmentVersion);
      Buffer buffer = FileBuffer.allocate(file, Math.min(DEFAULT_BUFFER_SIZE, storage.maxSegmentSize()), Integer.MAX_VALUE);
      SegmentDescriptor descriptor = new SegmentDescriptor(buffer);
      Segment segment = new Segment(new SegmentFile(file), buffer.position(SegmentDescriptor.BYTES).slice(), descriptor, createIndex(descriptor), new OffsetPredicate(), serializer.clone(), this);
      LOGGER.debug("Loaded file segment: {} ({})", descriptor.id(), file.getName());
      return segment;
    }
docs: Loads a segment.