DataFormatter class

Data formatter A class can help you convert byte data to base type or vice versa.

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

byte2Float32(List<int> bytes, {int offset = 0, bool isBigEndian = false}) double
Bytes -> Float32 Specify byte order, big endian or little endian, default is little endian
byte2Float64(List<int> bytes, {int offset = 0, bool isBigEndian = false}) double
Bytes -> Float64 Specify byte order, big endian or little endian, default is little endian
byte2Int(Iterable<int> bytes, {bool isBigEndian = false}) int
Bytes -> Int Specify byte order, big endian or little endian, default is little endian
float32ToByte(double float, {bool isBigEndian = false}) Iterable<int>
Float32 -> Bytes Specify byte order, big endian or little endian, default is little endian
float64ToByte(double float, {bool isBigEndian = false}) Iterable<int>
Float64 -> Bytes Specify byte order, big endian or little endian, default is little endian
int2Byte(int number, {int byteCount, bool isBigEndian = false}) Iterable<int>
Int -> Bytes Specify byte order, big endian or little endian, default is little endian. Also can specify byteCount, make sure byte list's length as result