UTF8Encoder class

Encodes a sequence of Unicode code points into a UTF-8 octet sequence.

Each code point in U+0000..U+10FFFF is emitted as 1 to 4 octets, and any UTF-16 surrogate pair in the input is combined into a single 4-octet sequence. Based on RFC-3629.

Inheritance

Constructors

UTF8Encoder()
Creates a new UTF8Encoder instance.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source int
The bit-length of the input array elements. The value should be between 2 to 64.
no setteroverride
target int
The bit-length of the output array elements. The value should be between 2 to 64.
no setteroverride

Methods

bind(Stream<Iterable<int>> stream) Stream<Iterable<int>>
Transforms the provided stream.
inherited
cast<RS, RT>() Converter<RS, RT>
Provides a Converter<RS, RT> view of this stream transformer.
inherited
convert(covariant List<int> input) Uint8List
Converts input array of numbers with bit-length of source to an array of numbers with bit-length of target. The input array will be treated as a sequence of bits to convert.
override
encode(String input) Uint8List
Encodes the UTF-16 code units of input into a UTF-8 octet sequence.
fuse<TT>(Converter<Iterable<int>, TT> other) Converter<Iterable<int>, TT>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startChunkedConversion(Sink<Iterable<int>> sink) Sink<Iterable<int>>
Starts a chunked conversion.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited