NullTerminatedStringType class

A BinaryType for Strings encoded with a null-terminating byte.

This BinaryType is a generic implementation for all string encodings. See the constants declared in this library for instances of this type for specific encodings.

Inheritance

Constructors

NullTerminatedStringType(Codec<String, List<int>> codec)
Create a new NullTerminatedStringType.
const

Properties

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

Methods

decode(List<int> encoded) String
Decodes encoded data.
inherited
decodeStream(Stream<List<int>> stream) Future<String>
Decode a single value from stream.
inherited
encode(String input) Uint8List
Encodes input.
inherited
encodeInto(String input, BytesBuilder builder) → void
Encode input into builder.
override
fuse<R>(Codec<List<int>, R> other) Codec<String, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startConversion(void onValue(String p1)) BinaryConversion<String>
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