DataSerializerPlatform class abstract
data_serializer
platform dependent functions.
The implementation resolve special cases for each platform.
Constructors
- DataSerializerPlatform()
-
Returns instance singleton.
factory
- DataSerializerPlatform.base()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxSafeInt → int
-
The maximum safe
int
int the current platform.no setter - maxSafeIntAsBigInt → BigInt
-
The maximum safe
int
int the current platform as BigInt.no setter - maxSafeIntBytes → Uint8List
-
The maximum safe
int
int the current platform as Uint8List.no setter - minSafeInt → int
-
The minimum safe
int
int the current platform.no setter - minSafeIntAsBigInt → BigInt
-
The minimum safe
int
int the current platform as BigInt.no setter - minSafeIntBytes → Uint8List
-
The minimum safe
int
int the current platform as Uint8List.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeIntBits → int
-
The amount of bits of a safe integer.
no setter
- supportsFullBitsShift → bool
-
Returns
true
if the platform fully supports bits shift.no setter - supportsFullInt64 → bool
-
Returns
true
if the platform fully supports 64 bits integers.no setter
Methods
-
checkSafeInteger(
int n) → void -
Checks if
n
is a safeint
. Throws StateError if is not a safeint
. -
checkSafeIntegerByBigInt(
BigInt n) → void -
Checks if
n
is a safeint
. Throws StateError if is not a safeint
. -
getDataTypeHandlerInt64(
IntCodec data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Int64
fromdata
atoffset
inendian
order. -
getDataTypeHandlerUint64(
IntCodec data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Uint64
fromdata
atoffset
inendian
order. -
getInt64(
ByteData data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Int64
fromdata
atoffset
inendian
order. -
getUint64(
ByteData data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Uint64
fromdata
atoffset
inendian
order. -
isSafeInteger(
int n) → bool -
Returns
true
ifn
is a safeint
. -
isSafeIntegerByBigInt(
BigInt n) → bool -
Returns
true
ifn
is a safeint
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readInt64(
Uint8List out, [int offset = 0, Endian endian = Endian.big]) → int -
Reads a
Int64
fromout
atoffset
inendian
order. -
readUint64(
Uint8List out, [int offset = 0, Endian endian = Endian.big]) → int -
Reads a
Uint64
fromout
atoffset
inendian
order. -
setDataTypeHandlerInt64(
IntCodec data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
data
bytes fromoffset
withn
asInt64
inendian
order. -
setDataTypeHandlerUint64(
IntCodec data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
data
bytes fromoffset
withn
asUint64
inendian
order. -
setInt64(
ByteData data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
data
bytes fromoffset
withn
asInt64
inendian
order. -
setUint64(
ByteData data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
data
bytes fromoffset
withn
asUint64
inendian
order. -
shiftLeftInt(
int n, int shift) → int -
Performs a left bit shift (
<<
). -
shiftRightInt(
int n, int shift) → int -
Performs a right bit shift (
>>
). -
toString(
) → String -
A string representation of this object.
inherited
-
writeInt64(
Uint8List out, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Writes
n
asInt64
toout
atoffset
inendian
order. -
writeUint64(
Uint8List out, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Writes
n
asUint64
toout
atoffset
inendian
order.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DataSerializerPlatform
-
Singleton instance of current DataSerializerPlatform implementation.
final