IntegerType class

A BinaryType for ints.

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

Inheritance

Constructors

IntegerType(int width, int _getValue(int offset, ByteData data, Endian endian), void _setValue(int value, int offset, ByteData data, Endian endian), {Endian endian = Endian.big})
Create a new IntegerType.
const

Properties

decoder Converter<List<int>, int>
Returns the decoder of this, converting from T to S.
no setterinherited
encoder Converter<int, Uint8List>
Returns the encoder from S to T.
no setterinherited
endian Endian
The endianness of this type's encoding.
final
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<List<int>, int>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
The width of this type's encoding, in bytes.
final

Methods

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