ByteConversionUtilities class

Class to handle int conversions.

Constructors

ByteConversionUtilities()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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

addPadding(List<int> data, int requiredSize) → void
bytesFromDouble64(double number, {Endian endian = Endian.big, bool doSigned = false}) List<int>
Convert a 64 bit double number to its int representation.
bytesFromFile(String path) Uint8List
Read a file from path into a bytes list.
bytesFromInt16(int number, {Endian endian = Endian.big, bool doSigned = false}) List<int>
Convert a 16 bit integer number to its int representation.
bytesFromInt32(int number, {Endian endian = Endian.big, bool doSigned = false}) List<int>
Convert a 32 bit integer number to its int representation.
bytesFromInt64(int number, {Endian endian = Endian.big, bool doSigned = false}) List<int>
Convert a 64 bit integer number to its int representation.
bytesFromString(String fileName) List<int>
Convert a name into a list of bytes.
bytesToFile(String path, List<int> bytes) String
Write a list of bytes to file and return the written file path.
getDouble32(dynamic int8list, [Endian endian = Endian.big]) double
Get a double from a list of 4 bytes.
getDouble64(dynamic int8list, [Endian endian = Endian.big]) double
Get a double from a list of 8 bytes.
getInt8(dynamic int8list) int
Get an int from a list of 1 byte.
getInt16(dynamic int8list, [Endian endian = Endian.big]) int
Get an int from a list of 2 bytes.
getInt32(dynamic int8list, [Endian endian = Endian.big]) int
Get an int from a list of 4 bytes.