readValue method
- ReadBuffer buffer
Reads a value from buffer
as written by writeValue.
This method is intended for use by subclasses overriding readValueOfType.
Implementation
Object? readValue(ReadBuffer buffer) {
if (!buffer.hasRemaining) {
throw const FormatException('Message corrupted');
}
final int type = buffer.getUint8();
return readValueOfType(type, buffer);
}