CodedBufferWriter class

Writer used for converting GeneratedMessages into binary representation.

Note that it is impossible to serialize protobuf messages using a one pass streaming serialization as some values are serialized using length-delimited representation, which means that they are represented as a varint encoded length followed by specified number of bytes of data.

Due to this CodedBufferWritter maintains two output buffers: _outputChunks which contains all continuously written bytes and _splices which describes additional bytes to splice in-between _outputChunks bytes.

Constructors

CodedBufferWriter()

Properties

lengthInBytes → int
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toBuffer() → Uint8List
writeField(int fieldNumber, int fieldType, dynamic fieldValue) → void
writeInt32NoTag(int value) → void
writeTo(Uint8List buffer, [ int offset = 0 ]) → bool
Serializes everything written to this writer so far to buffer, starting from offset in buffer. Returns true on success.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited