MsgPackReader class

Implements a msgpack deserializer over a base BytesReader

To support deserialization of custom objects it relies on the definition a function that is able to use Map<String, dynamic> representation and generate the appropriate object out of it. Those methods can be automatically generated with the json_serializable dart package or similar. Note that what is deserialized is the Map representation of the object, therefore this method should be provided in some form.

Inheritance

Constructors

MsgPackReader(Uint8List list, {MsgPackReaderMode mode = MsgPackReaderMode.standard, dynamic fromEncodable(Map<String, dynamic>)?, List<MsgPackExtension>? extensions})
Builds a MsgPackReader deserializer

Properties

copyBinaryData bool
If false, decoded binary data buffers will reference underlying input buffer and thus may change when the content of input buffer changes.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
mode MsgPackReaderMode
The reader mode
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() → dynamic
Reads the buffer contents
override
readArray(int length) List
Reads a List from the backing buffer
inherited
readBuffer(int length) Uint8List
Reads a Uint8List from the backing buffer
inherited
readFloat32() double
Reads a float32 from the backing buffer
inherited
readFloat64() double
Reads a float64 from the backing buffer
inherited
readInt16() int
Reads a int16 from the backing buffer
inherited
readInt32() int
Reads a int32 from the backing buffer
inherited
readInt64() int
Reads a int64 from the backing buffer
inherited
readInt8() int
Reads a int8 from the backing buffer
inherited
readJsonMap(int length) Map<String, dynamic>
Reads the encodable representation of the object
readStandardMap(int length) Map
Reads a Map from the backing buffer
inherited
readString(int length) String
Reads a String from the backing buffer
inherited
readUInt16() int
Reads a uint16 from the backing buffer
inherited
readUInt32() int
Reads a uint32 from the backing buffer
inherited
readUInt64() int
Reads a uint64 from the backing buffer
inherited
readUInt8() int
Reads a uint8 from the backing buffer
inherited
toString() String
A string representation of this object.
inherited

Operators

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