A Utf8Codec encodes strings to utf-8 code units (bytes) and decodes UTF-8 code units to strings.

Inheritance

Properties

decoder Utf8Decoder
read-only

encoder Utf8Encoder
read-only

inverted Codec<List<int>,String>
read-only, inherited

Inverts this.

name String
read-only

Constructors

Utf8Codec({bool allowMalformed: false})
const

Instantiates a new Utf8Codec.

Methods

decode(List<int> codeUnits, {bool allowMalformed}) → String

Decodes the UTF-8 codeUnits (a list of unsigned 8-bit integers) to the corresponding string.

decodeStream(Stream<List<int>> byteStream) → Future<String>
inherited

encode(String input) → List<int>
inherited

fuse(Codec<List<int>> other) → Codec<String>
inherited

Fuses this with other.