Class BinaryRowWriter

java.lang.Object
io.fury.format.row.binary.writer.BinaryWriter
io.fury.format.row.binary.writer.BinaryRowWriter

public class BinaryRowWriter extends BinaryWriter
Writer to write data into buffer using row format, see BinaryRow.

Must call reset() before use this writer to write a nested row.

Must call reset(buffer)/reset(buffer, offset) before use this writer to write a new row.

  • Constructor Details

    • BinaryRowWriter

      public BinaryRowWriter(org.apache.arrow.vector.types.pojo.Schema schema)
    • BinaryRowWriter

      public BinaryRowWriter(org.apache.arrow.vector.types.pojo.Schema schema, BinaryWriter writer)
  • Method Details

    • getSchema

      public org.apache.arrow.vector.types.pojo.Schema getSchema()
    • reset

      public void reset()
      Call reset() before write nested row to buffer

      reset BinaryRowWriter(schema, writer) increase writerIndex, which increase writer's writerIndex, so we need to record writer's writerIndex before call reset, so we can call writer's setOffsetAndSize(int ordinal, int absoluteOffset, int size). Reset will change writerIndex, please use it very carefully

    • getOffset

      public int getOffset(int ordinal)
      Specified by:
      getOffset in class BinaryWriter
    • write

      public void write(int ordinal, byte value)
      Specified by:
      write in class BinaryWriter
    • write

      public void write(int ordinal, boolean value)
      Specified by:
      write in class BinaryWriter
    • write

      public void write(int ordinal, short value)
      Specified by:
      write in class BinaryWriter
    • write

      public void write(int ordinal, int value)
      Specified by:
      write in class BinaryWriter
    • write

      public void write(int ordinal, float value)
      Specified by:
      write in class BinaryWriter
    • write

      public void write(int ordinal, BigDecimal value)
      Specified by:
      write in class BinaryWriter
    • getRow

      public BinaryRow getRow()
    • copyToRow

      public BinaryRow copyToRow()