com.vertica.sdk.DFSFileReader Class Reference
Collaboration diagram for com.vertica.sdk.DFSFileReader:
| 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
UdfException: UDF problemDestroyInvocation: vertica 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
buffer: buffer to read intosize: number of bytes to read
Returns number of bytes actually read, 0 if no bytes were read, indicates the EOF.
Exceptions
UdfException: UDF problemDestroyInvocation: vertica 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
offset: location to seek toorigin: origin from which to seek
Returns the new file offset.
Exceptions
UdfException: UDF problemDestroyInvocation: vertica canceling – do not catch or handle