public final CheckedMemorySegment putChar ( int index , char value ) { if ( index >= 0 && index < this . size - 1 ) { this . memory [ this . offset + index + 0 ] = ( byte ) ( value >> 8 ) ; this . memory [ this . offset + index + 1 ] = ( byte ) value ; return this ; } else { throw new IndexOutOfBoundsException ( ) ; } }
Writes two memory containing the given char value in the current byte order into this buffer at the given position .