Interface FieldWriter

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ComplexFieldWriter, DoubleFieldWriter, FloatFieldWriter, LongFieldWriter, NumericArrayFieldWriter, NumericFieldWriter, StringArrayFieldWriter, StringFieldWriter

public interface FieldWriter extends Closeable
Helper used to write field values to row-based frames or RowKey. Most callers should use FrameWriters to build frames from ColumnSelectorFactory, rather than using this interface directly. Not thread-safe.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases resources held by this writer.
    long
    writeTo(org.apache.datasketches.memory.WritableMemory memory, long position, long maxSize)
    Writes the current selection at the given memory position.
  • Method Details

    • writeTo

      long writeTo(org.apache.datasketches.memory.WritableMemory memory, long position, long maxSize)
      Writes the current selection at the given memory position.
      Parameters:
      memory - memory region in little-endian order
      position - position to write
      maxSize - maximum number of bytes to write
      Returns:
      number of bytes written, or -1 if "maxSize" was not enough memory
    • close

      void close()
      Releases resources held by this writer.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable