Java SDK Documentation  8.1
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

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.

Returns
number of bytes read, 0 if no bytes were read, indicates the EOF. throws exceptions if there are errors.
long com.vertica.sdk.DFSFileReader.seek ( long  offset,
int  origin 
) throws UdfException, DestroyInvocation

Reposition the read file offset.

Returns
the new file offset.