Output class abstract
A base class for encoder output. Derived classes must implement these methods as a minimum to provide full CBOR encoding.
- Implementers
Constructors
- Output(dynamic _buffer, dynamic _pauseBuffer)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Clear the buffer
-
getData(
) → Uint8Buffer - Get the current output buffer
-
mark(
) → void - Mark the current buffers position. Used for rollback in conjunction with the resetToMark method. Only one mark can be in force at a time, they cannot be nested. Marking only applies to the encoded output buffer.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pauses encoding, copies the encoded output buffer to the pause buffer, and clears the output buffer. Further encoding carries on as normal in the output buffer. Used to encode CBOR items as standalone entities for later inclusion in the main encoding stream, e.g map values. Has no effect if already paused.
-
putByte(
int value) → void - Write asingle byte
-
putBytes(
Uint8Buffer data) → void - Write multiple bytes
-
resetToMark(
) → void - Resets the buffer back to its last mark position, used to protect complex encodes(arrays, maps) that may not work.
-
restart(
[bool append = false]) → void - Restart after pause, copies the pause buffer back into the output buffer, if append is true the current output buffer contents are appended to the pause buffer.
-
size(
) → int - Current buffer size
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited