Class MsgPackTokenWriter

java.lang.Object
org.apache.juneau.marshall.msgpack.MsgPackTokenWriter
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, RecordWriter, TokenWriter

public class MsgPackTokenWriter extends Object implements TokenWriter
Reference implementation of the public TokenWriter surface for the MessagePack format.

MessagePack containers are length-prefixed (no indefinite-length encoding); the writer therefore buffers each open container's body bytes until endObject() / endArray() is called, then writes the length-prefix header followed by the buffered bytes. Memory cost is O(largest open container).

Notes:
  • This class is not thread safe.
  • byte[] values dispatch to native MsgPack bin, not to a base64 string fallback.