code: @SuppressWarnings("restriction")
  	public final void putChar(int index, char value) {
  		final long pos = address + index;
  		if (index >= 0 && pos <= addressLimit - 2) {
  			UNSAFE.putChar(heapMemory, pos, value);
  		}
  		else if (address > addressLimit) {
  			throw new IllegalStateException("segment has been freed");
  		}
  		else {
  			// index is in fact invalid
  			throw new IndexOutOfBoundsException();
  		}
  	}
docs: Writes a char value to the given position, in the system's native byte order.
  
  @param index The position at which the memory will be written.
  @param value The char value to be written.
  
  @throws IndexOutOfBoundsException Thrown, if the index is negative, or larger than the segment
  size minus 2.