code: @Override
  	public void writeToOutput(final ChannelWriterOutputView output, final int start, int num) throws IOException {
  		int currentMemSeg = start / this.indexEntriesPerSegment;
  		int offset = (start % this.indexEntriesPerSegment) * this.indexEntrySize;
  		
  		while (num > 0)
  		{
  			final MemorySegment currentIndexSegment = this.sortIndex.get(currentMemSeg++);
  			// check whether we have a full or partially full segment
  			if (num >= this.indexEntriesPerSegment && offset == 0) {
  				// full segment
  				for (;offset <= this.lastIndexEntryOffset; offset += this.indexEntrySize) {
  					final long pointer = currentIndexSegment.getLong(offset);
  					this.recordBuffer.setReadPosition(pointer);
  					this.serializer.copy(this.recordBuffer, output);
  				}
  				num -= this.indexEntriesPerSegment;
  			} else {
  				// partially filled segment
  				for (; num > 0 && offset <= this.lastIndexEntryOffset; num--, offset += this.indexEntrySize)
  				{
  					final long pointer = currentIndexSegment.getLong(offset);
  					this.recordBuffer.setReadPosition(pointer);
  					this.serializer.copy(this.recordBuffer, output);
  				}
  			}
  			offset = 0;
  		}
  	}
docs: Writes a subset of the records in this buffer in their logical order to the given output.
  
  @param output The output view to write the records to.
  @param start The logical start position of the subset.
  @param num The number of elements to write.
  @throws IOException Thrown, if an I/O exception occurred writing to the output view.