Input mixin

Trait that allows reading of data into a slice.

Mixin Applications


remainingLength int?
Should return the remaining length of the input data. If no information about the input length is available, null should be returned.
no setter
buffer Uint8List
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


assertEndOfDataReached([String message = '']) → void
Asserts if the end of data is reached or not
clone() Input
Clone the input
hasBytes() bool
returns true if there are bytes left to be read
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
peekByte(int index) int
Gives a peek of the byte of current index and does not increments the current index
peekBytes(int start, int length) Uint8List
Gives a peek of the bytescurrentIndex, currentIndex + length Does not increments the current index
read() int
Read a single byte from the input.
readBytes(int length) UnmodifiableUint8ListView
Get the bytes from the current index to the length
resetOffset() → void
toHex() String
Get the hex string of the buffer
toString() String
A string representation of this object.


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

Static Methods

fromBytes(List<int> bytes) ByteInput
fromHex(String hex) ByteInput