RpcProtoReader class final
Reads protobuf wire format from bytes, one field at a time.
Every malformed input throws FormatException: a truncated or overlong varint, a field that runs past the buffer, a group wire type. Unknown fields are skipped with skip, as protobuf's forward-compatibility rule requires.
Exact on the web: varints are accumulated in 32-bit halves, so values past
2^32 and negative int32/int64 (ten bytes of two's complement) decode the
same under dart2js as on the VM.
Constructors
- RpcProtoReader(Uint8List bytes)
-
Reads from the start of
bytes.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readBytes(
) → Uint8List - Reads a length-delimited field: a view of its bytes.
-
readString(
) → String - Reads a length-delimited field as UTF-8.
-
readTag(
) → ({int field, int wireType}) - Reads a field tag: its field number and wire type.
-
readVarint(
) → int -
Reads a varint, signed as protobuf encodes
int32andint64. -
skip(
int wireType) → void -
Skips the value of a field of
wireTypewhose tag was just read. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited