Mutf8Sink

abstract class Mutf8Sink(bytesPerWrite: Int = 1024)(source)

Something that Modified UTF-8 data can be written to.

For convenience in various scenarios, said data can be written from several forms:

Both methods also have overloads for writing a specific range of characters from the sequences, rather than the entire thing.

Parameters

bytesPerWrite

The maximum number of bytes that will be copied to the sink's underlying destination at a time. This must be at least 1, though higher is recommended.

Throws

Constructors

Link copied to clipboard
fun Mutf8Sink(bytesPerWrite: Int = 1024)

Functions

Link copied to clipboard
fun writeFromArray(characters: CharArray)

Encodes all the characters in a CharSequence and writes them to the sink's underlying destination.

fun writeFromArray(characters: CharArray, range: IntRange)

An alias for writeFromArray that uses a single range parameter, rather than a separate startIndex and endIndex.

fun writeFromArray(characters: CharArray, startIndex: Int, endIndex: Int)

Encodes all the characters in a specific range of a CharArray and writes them to the sink's underlying destination.

Link copied to clipboard

Encodes all the characters in a CharSequence and writes them to the sink's underlying destination.

fun writeFromSequence(characters: CharSequence, range: IntRange)

An alias for writeFromSequence that uses a single range parameter, rather than a separate startIndex and endIndex.

fun writeFromSequence(characters: CharSequence, startIndex: Int, endIndex: Int)

Encodes all the characters in a specific range of a CharSequence and writes them to the sink's underlying destination.

Link copied to clipboard
abstract fun writeLength(mutf8Length: Int)

Writes the length of a Modified UTF-8 string to the sink's underlying destination.

Inheritors

Link copied to clipboard