BinaryLengthValue class
Represents a length-value encoding of a value.
Use the BinaryLengthValue.encode method to convert a list of BinaryLengthValue to a sequence of bytes. The items in that list can be created from Uint8List using the default constructor, from a BigInt with BinaryLengthValue.fromBigInt or from a String with BinaryLengthValue.fromString.
Constructors
- BinaryLengthValue(Uint8List bytes)
- Create a length-value for a sequence of bytes.
- BinaryLengthValue.fromBigInt(BigInt value)
- Create a length-value for a multiple precision integer.
- BinaryLengthValue.fromString(String value, {Encoding encoding = utf8})
- Create a length plus bytes for a string.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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
-
encode(
Iterable< BinaryLengthValue> items) → Uint8List - Encodes a sequence of length-value.