Class BinaryWriterSchemaHolder


  • public class BinaryWriterSchemaHolder
    extends Object
    Binary writer schema holder.
    • Constructor Detail

      • BinaryWriterSchemaHolder

        public BinaryWriterSchemaHolder()
    • Method Detail

      • push

        public void push​(int id,
                         int off)
        Push another frame.
        Parameters:
        id - Field ID.
        off - Field offset.
      • build

        public void build​(BinarySchema.Builder builder,
                          int fieldCnt)
        Build the schema.
        Parameters:
        builder - Builder.
        fieldCnt - Fields count.
      • write

        public int write​(BinaryOutputStream out,
                         int fieldCnt,
                         boolean compactFooter)
        Write collected frames. Note, that after writing collected frames, you must call pop(int) method with the total number of written frames as an argument.
        Parameters:
        out - Output stream.
        fieldCnt - Count.
        compactFooter - Whether footer should be written in compact form.
        Returns:
        Amount of bytes dedicated to each field offset. Could be 1, 2 or 4.
      • pop

        public void pop​(int fieldCnt)
        Pop current object's frame.