writeMutf8Array
fun Output.writeMutf8Array(characters: CharArray, startIndex: Int = 0, endIndex: Int = characters.size, bytesPerWrite: Int = DEFAULT_BYTES_PER_WRITE)(source)
Creates a OutputMutf8Sink around the receiver, writes the mutf8Length of the characters, and then writes the characters themselves.
In code, that would be:
val mutf8Length = characters.mutf8Length(startIndex, endIndex)
val sink = OutputMutf8Sink(output = this, bytesPerWrite)
sink.writeLength(mutf8Length)
sink.writeFromArray(characters, startIndex, endIndex)
Content copied to clipboard
See the documentation for those methods (linked below) for their limitations, exceptions, parameters, and their meanings.
See also
fun Output.writeMutf8Array(characters: CharArray, range: IntRange = 0..characters.lastIndex, bytesPerWrite: Int = DEFAULT_BYTES_PER_WRITE)(source)
Creates a OutputMutf8Sink around the receiver, writes the mutf8Length of the characters, and then writes the characters themselves.
In code, that would be:
val mutf8Length = characters.mutf8Length(startIndex = range.first, endIndex = range.last + 1)
val sink = OutputMutf8Sink(output = this, bytesPerWrite)
sink.writeLength(mutf8Length)
sink.writeFromArray(characters, range)
Content copied to clipboard
See the documentation for those methods (linked below) for their limitations, exceptions, parameters, and their meanings.