MqttEncoding class

Encoding implementation that can encode and decode strings in the MQTT string format.

The MQTT string format is simply a pascal string with ANSI character encoding. The first 2 bytes define the length of the string, and they are followed by the string itself.

Inheritance

Constructors

MqttEncoding()

Properties

decoder Utf8Decoder
Returns the decoder of this, converting from List<int> to String. [...]
read-only, inherited
encoder Utf8Encoder
Returns the encoder from String to List<int>. [...]
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
inverted Codec<List<int>, String>
Inverts this. [...]
read-only, inherited
name String
The name of this codec, "utf-8".
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

decode(List<int> codeUnits, {bool allowMalformed}) String
Decodes the UTF-8 codeUnits (a list of unsigned 8-bit integers) to the corresponding string. [...]
inherited
decodeStream(Stream<List<int>> byteStream) Future<String>
inherited
encode(String input) List<int>
Encodes input. [...]
inherited
fuse<R>(Codec<List<int>, R> other) Codec<String, R>
Fuses this with other. [...]
inherited
getByteCount(String chars) int
Calculates the number of bytes produced by encoding the characters in the specified.
getBytes(String s) Uint8Buffer
Encodes all the characters in the specified string into a sequence of bytes.
getCharCount(Uint8Buffer bytes) int
When overridden in a derived class, calculates the number of characters produced by decoding all the bytes in the specified byte array.
getString(Uint8Buffer bytes) String
Decodes the bytes in the specified byte array into a string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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