docs: @Override
  	protected MemorySegment nextSegment(MemorySegment current) throws IOException {
  		// check if we are at our end
  		if (this.inLastBlock) {
  			throw new EOFException();
  		}
  
  		// send a request first. if we have only a single segment, this same segment will be the one obtained in
  		// the next lines
  		if (current != null) {
  			sendReadRequest(current);
  		}
  
  		// get the next segment
  		final MemorySegment seg = this.reader.getNextReturnedBlock();
  
  		// check the header
  		if (seg.getShort(0) != ChannelWriterOutputView.HEADER_MAGIC_NUMBER) {
  			throw new IOException("The current block does not belong to a ChannelWriterOutputView / " +
  					"ChannelReaderInputView: Wrong magic number.");
  		}
  		if ( (seg.getShort(ChannelWriterOutputView.HEADER_FLAGS_OFFSET) & ChannelWriterOutputView.FLAG_LAST_BLOCK) != 0) {
  			// last block
  			this.numRequestsRemaining = 0;
  			this.inLastBlock = true;
  		}
  
  		return seg;
  	}