Class JNIWriter

java.lang.Object
dev.vortex.jni.JNIWriter
All Implemented Interfaces:
VortexWriter, AutoCloseable

public final class JNIWriter extends Object implements VortexWriter, AutoCloseable
JNI implementation of VortexWriter.

This class implements AutoCloseable to ensure proper resource cleanup when used with try-with-resources.

  • Constructor Summary

    Constructors
    Constructor
    Description
    JNIWriter(long ptr)
    Creates a new JNIWriter with the given native pointer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the writer and finalizes the Vortex file.
    void
    writeBatch(byte[] arrowData)
    Writes a batch of Arrow data to the Vortex file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JNIWriter

      public JNIWriter(long ptr)
      Creates a new JNIWriter with the given native pointer.
      Parameters:
      ptr - the native writer pointer
  • Method Details

    • writeBatch

      public void writeBatch(byte[] arrowData) throws IOException
      Writes a batch of Arrow data to the Vortex file.
      Specified by:
      writeBatch in interface VortexWriter
      Parameters:
      arrowData - the Arrow data in IPC format as byte array
      Throws:
      NullPointerException - if this is called after the writer has been closed.
      IOException - if writing fails
    • close

      public void close()
      Closes the writer and finalizes the Vortex file.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface VortexWriter
      Throws:
      RuntimeException - if closing fails