BinaryType<T> class abstract

A Codec specialized for converting binary data.

BinaryType may be used as a supertype for any codec implementing binary serialization and deserialization based on a BinaryConversion and an encodeInto method.

To decode a stream of binary data, call Stream.transform with decoder (stream.transform(type.decoder)).

Inheritance
Implementers

Constructors

BinaryType()
A Codec specialized for converting binary data.
const

Properties

decoder Converter<List<int>, T>
Returns the decoder of this, converting from T to S.
no setteroverride
encoder Converter<T, Uint8List>
Returns the encoder from S to T.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<List<int>, T>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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