Java SDK Documentation  23.4.0
com.vertica.sdk.DFSFileWriter Class Reference
Collaboration diagram for com.vertica.sdk.DFSFileWriter:
Collaboration graph

Public Member Functions

 DFSFileWriter (DFSFile dfsFile)
 
void close () throws UdfException, DestroyInvocation
 
boolean isOpen ()
 
void open () throws UdfException, DestroyInvocation
 
int write (ByteBuffer buffer) throws UdfException, DestroyInvocation
 

Member Function Documentation

void com.vertica.sdk.DFSFileWriter.close ( ) throws UdfException, DestroyInvocation

Closes the file opened for writing.

Exceptions
UdfExceptionUDF problem
DestroyInvocationvertica canceling – do not catch or handle
void com.vertica.sdk.DFSFileWriter.open ( ) throws UdfException, DestroyInvocation

Opens a file for writing.

Exceptions
UdfExceptionUDF problem
DestroyInvocationvertica canceling – do not catch or handle
int com.vertica.sdk.DFSFileWriter.write ( ByteBuffer  buffer) throws UdfException, DestroyInvocation

Writes bytes into the file from the ByteBuffer

Bytes are retrieved from the buffer starting from the current position till it's limit. Current position will be advanced depending on how many bytes are written.

Parameters
bufferthe ByteBuffer to write
Returns
number of bytes written, could be 0.
Exceptions
UdfExceptionUDF problem
DestroyInvocationvertica canceling – do not catch or handle