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
intint the current platform.no setter - maxSafeIntAsBigInt → BigInt
-
The maximum safe
intint the current platform as BigInt.no setter - maxSafeIntBytes → Uint8List
-
The maximum safe
intint the current platform as Uint8List.no setter - minSafeInt → int
-
The minimum safe
intint the current platform.no setter - minSafeIntAsBigInt → BigInt
-
The minimum safe
intint the current platform as BigInt.no setter - minSafeIntBytes → Uint8List
-
The minimum safe
intint 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
trueif the platform fully supports bits shift.no setter - supportsFullInt64 → bool
-
Returns
trueif the platform fully supports 64 bits integers.no setter
Methods
-
checkSafeInteger(
int n) → void -
Checks if
nis a safeint. Throws StateError if is not a safeint. -
checkSafeIntegerByBigInt(
BigInt n) → void -
Checks if
nis a safeint. Throws StateError if is not a safeint. -
getDataTypeHandlerInt64(
IntCodec data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Int64fromdataatoffsetinendianorder. -
getDataTypeHandlerUint64(
IntCodec data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Uint64fromdataatoffsetinendianorder. -
getInt64(
ByteData data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Int64fromdataatoffsetinendianorder. -
getUint64(
ByteData data, [int offset = 0, Endian endian = Endian.big]) → int -
Gets a
Uint64fromdataatoffsetinendianorder. -
isSafeInteger(
int n) → bool -
Returns
trueifnis a safeint. -
isSafeIntegerByBigInt(
BigInt n) → bool -
Returns
trueifnis 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
Int64fromoutatoffsetinendianorder. -
readUint64(
Uint8List out, [int offset = 0, Endian endian = Endian.big]) → int -
Reads a
Uint64fromoutatoffsetinendianorder. -
setDataTypeHandlerInt64(
IntCodec data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
databytes fromoffsetwithnasInt64inendianorder. -
setDataTypeHandlerUint64(
IntCodec data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
databytes fromoffsetwithnasUint64inendianorder. -
setInt64(
ByteData data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
databytes fromoffsetwithnasInt64inendianorder. -
setUint64(
ByteData data, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Sets
databytes fromoffsetwithnasUint64inendianorder. -
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
nasInt64tooutatoffsetinendianorder. -
writeUint64(
Uint8List out, int n, [int offset = 0, Endian endian = Endian.big]) → void -
Writes
nasUint64tooutatoffsetinendianorder.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DataSerializerPlatform
-
Singleton instance of current DataSerializerPlatform implementation.
final