Package dev.vortex.jni
Class JNIWriter
java.lang.Object
dev.vortex.jni.JNIWriter
- All Implemented Interfaces:
VortexWriter
,AutoCloseable
JNI implementation of VortexWriter.
This class implements AutoCloseable to ensure proper resource cleanup when used with try-with-resources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the writer and finalizes the Vortex file.void
writeBatch
(byte[] arrowData) Writes a batch of Arrow data to the Vortex file.
-
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
Writes a batch of Arrow data to the Vortex file.- Specified by:
writeBatch
in interfaceVortexWriter
- 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 interfaceAutoCloseable
- Specified by:
close
in interfaceVortexWriter
- Throws:
RuntimeException
- if closing fails
-