Mutf8Sink
Something that Modified UTF-8 data can be written to.
For convenience in various scenarios, said data can be written from several forms:
writeFromSequence: The characters to write are taken a CharSequence, such as a String
writeFromArray: The characters to write are taken from a CharArray
Both methods also have overloads for writing a specific range of characters from the sequences, rather than the entire thing.
Parameters
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
if bytesPerWrite is less than 1
.
Constructors
Functions
Encodes all the characters in a CharSequence and writes them to the sink's underlying destination.
An alias for writeFromArray that uses a single range parameter, rather than a separate startIndex
and endIndex
.
Encodes all the characters in a specific range of a CharArray and writes them to the sink's underlying destination.
Encodes all the characters in a CharSequence and writes them to the sink's underlying destination.
An alias for writeFromSequence that uses a single range parameter, rather than a separate startIndex
and endIndex
.
Encodes all the characters in a specific range of a CharSequence and writes them to the sink's underlying destination.
Writes the length of a Modified UTF-8 string to the sink's underlying destination.