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

Public Member Functions

 DFSFileReader (DFSFile dfsFile)
 
void close () throws UdfException, DestroyInvocation
 
boolean isOpen ()
 
void open () throws UdfException, DestroyInvocation
 
int read (ByteBuffer buffer, int size) throws UdfException, DestroyInvocation
 
long seek (long offset, int origin) throws UdfException, DestroyInvocation
 
long size ()
 

Member Function Documentation

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

Closes the file opened for reading

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

Reads 'size' of bytes into buffer pointed by 'ptr' from the file opened for reading.

Parameters
bufferbuffer to read into
sizenumber of bytes to read
Returns
number of bytes actually read, 0 if no bytes were read, indicates the EOF.
Exceptions
UdfExceptionUDF problem
DestroyInvocationvertica canceling – do not catch or handle
long com.vertica.sdk.DFSFileReader.seek ( long  offset,
int  origin 
) throws UdfException, DestroyInvocation

Reposition the read file offset.

Parameters
offsetlocation to seek to
originorigin from which to seek
Returns
the new file offset.
Exceptions
UdfExceptionUDF problem
DestroyInvocationvertica canceling – do not catch or handle