MqttVariableByteIntegerEncoding class

The Variable Byte Integer is encoded using an encoding scheme which uses a single byte for values up to 127. Larger values are handled as follows. The least significant seven bits of each byte encode the data, and the most significant bit is used to indicate whether there are bytes following in the representation. Thus, each byte encodes 128 values and a "continuation bit".

The maximum number of bytes in the Variable Byte Integer field is four. The encoded value MUST use the minimum number of bytes necessary to represent the value MQTT-1.5.5-1.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fromInt(int value) → Uint8Buffer
Integer to byte integer The convertible value range is 0 .. 268,435,455 (0xFF, 0xFF, 0xFF, 0x7F)
length(int value) int
The length in bytes of the supplied value
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toInt(Uint8Buffer? byteInteger) int
Byte integer to integer
toString() String
A string representation of this object.
inherited

Operators

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

Constants

maxConvertibleValue → const int