SerialBuffer class

Serialize and deserialize data */

Constructors

SerialBuffer(Uint8List? array)
@param __namedParameters

Properties

array Uint8List?
Data in serialized (binary) form */
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
length int
Amount of valid data in array */
getter/setter pair
readPos int
Current position while reading (deserializing) */
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asUint8List() Uint8List
Return data with excess storage trimmed away */
get() int
Get a single byte */
getAsset() String
Get an asset */
getBytes() Uint8List
Get length-prefixed binary data */
getFloat32() double
getFloat64() double
getName() String
Get a name */
getPrivateKey() String
Get a private key */
getPublicKey() String
Get a public key */
getSignature() String
Get a signature */
getString() String
Get a string */
getSymbol() Symbol
Get a symbol */
getSymbolCode() → dynamic
Get a symbol_code. Unlike symbol, symbol_code doesn't include a precision. */
getUint16() int
Get a uint16 */
getUint32() int
Get a uint32 */
getUint64AsNumber() int
Get a uint64 as a number. Caution: number only has 53 bits of precision; some values will change. numeric.binaryToDecimal(serialBuffer.getUint8List(8)) recommended instead
getUint8List(int len) Uint8List
Get len bytes */
getVarint32() int
Get a varint32 */
getVaruint32() int
Get a varuint32 */
haveReadData() bool
Is there data available to read? */
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
push(List<int> v) → void
Append bytes */
pushArray(List<int> v) → void
Append bytes */
pushAsset(String s) → void
Append an asset */
pushBytes(List<int> v) → void
Append length-prefixed binary data */
pushFloat32(double v) → void
pushFloat64(double v) → void
pushName(String s) → void
Append a name */
pushNumberAsUint64(int v) → void
Append a uint64. Caution: number only has 53 bits of precision */
pushPrivateKey(String s) → void
Append a private key */
pushPublicKey(String s) → void
Append a public key */
pushSignature(String s) → void
Append a signature */
pushString(String v) → void
Append a string */
pushSymbol(Symbol symbol) → void
Append a symbol */
pushSymbolCode(String name) → void
Append a symbol_code. Unlike symbol, symbol_code doesn't include a precision. */
pushUint16(int v) → void
Append a uint16 */
pushUint32(int v) → void
Append a uint32 */
pushUint8ListChecked(Uint8List v, int len) → void
Append bytes in v. Throws if len doesn't match v.length */
pushVarint32(int v) → void
Append a varint32 */
pushVaruint32(int v) → void
Append a varuint32 */
reserve(int size) → void
Resize array if needed to have at least size bytes free */
restartRead() → void
Restart reading from the beginning */
toString() String
A string representation of this object.
inherited

Operators

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