StreamMutf8Sink

class StreamMutf8Sink(stream: OutputStream, bytesPerWrite: Int = 1024) : Mutf8Sink(source)

A Mutf8Sink that writes its data to an OutputStream.

Parameters

stream

The OutputStream to write to.

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 StreamMutf8Sink(stream: OutputStream, 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
open override fun writeLength(mutf8Length: Int)

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