LengthPrefixedListType<T> class

A BinaryType for variable length lists prefixed with an integer value indicating their length.

Inheritance

Constructors

LengthPrefixedListType(BinaryType<int> lengthType, BinaryType<T> type)
Create a new LengthPrefixedListType.
const

Properties

decoder Converter<List<int>, List<T>>
Returns the decoder of this, converting from T to S.
no setterinherited
encoder Converter<List<T>, Uint8List>
Returns the encoder from S to T.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<List<int>, List<T>>
Inverts this.
no setterinherited
lengthType BinaryType<int>
The BinaryType used to read the length prefix.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type BinaryType<T>
The BinaryType used to read the elements of the list.
final

Methods

decode(List<int> encoded) List<T>
Decodes encoded data.
inherited
decodeStream(Stream<List<int>> stream) Future<List<T>>
Decode a single value from stream.
inherited
encode(List<T> input) Uint8List
Encodes input.
inherited
encodeInto(List<T> input, BytesBuilder builder) → void
Encode input into builder.
override
fuse<R>(Codec<List<int>, R> other) Codec<List<T>, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startConversion(void onValue(List<T> p1)) BinaryConversion<List<T>>
Start a new BinaryConversion that converts binary data to this type.
override
toString() String
A string representation of this object.
inherited

Operators

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