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 fromTtoS.no setteroverride -
encoder
→ Converter<
T, Uint8List> -
Returns the encoder from
StoT.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
encodeddata.inherited -
decodeStream(
Stream< List< stream) → Future<int> >T> -
Decode a single value from
stream. -
encode(
T input) → Uint8List -
Encodes
input.override -
encodeInto(
T input, BytesBuilder builder) → void -
Encode
inputintobuilder. -
fuse<
R> (Codec< List< other) → Codec<int> , R>T, R> -
Fuses
thiswithother.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