Class MsgPackDocumentTreeWriter


  • public final class MsgPackDocumentTreeWriter
    extends Object
    Represents an message pack document tree writer.

    On calling the write(MsgPackTree) method the writer will write the corresponding message pack document into a result buffer and return the size of the written document. The result buffer is available via the getResult() method.

    • Constructor Detail

      • MsgPackDocumentTreeWriter

        public MsgPackDocumentTreeWriter​(int initialDocumentSize)
    • Method Detail

      • write

        public int write​(MsgPackTree documentTree)
        Writes the message pack tree into the result buffer. Returns the size of the written message pock document. The result buffer is available via the getResult() method.
        Parameters:
        documentTree - the tree which should be written
        Returns:
        the size of the message pack document
      • getResult

        public org.agrona.MutableDirectBuffer getResult()