public class ClobLocatorReader extends Reader
Reader that will use an locator to fetch the
Clob value from the server.
This Reader implementation is pretty basic. No
buffering of data is done. Hence, for efficieny #read(char[])
should be used instead of #read(). Marks are not supported, but it
should be pretty simple to extend the implementation to support
this. A more efficient skip implementation should also be
straight-forward.
| Constructor and Description |
|---|
ClobLocatorReader(Connection connection,
Clob clob)
Create an
Reader for reading the
Clob value represented by the given locator based
Clob object. |
ClobLocatorReader(Connection connection,
Clob clob,
long pos,
long len)
Create an
Reader for reading the
Clob value represented by the given locator based
Clob object. |
public ClobLocatorReader(Connection connection, Clob clob) throws SqlException
Reader for reading the
Clob value represented by the given locator based
Clob object.connection - connection to be used to read the
Clob value from the serverclob - Clob object that contains locator for
the Clob value on the server.SqlExceptionpublic ClobLocatorReader(Connection connection, Clob clob, long pos, long len) throws SqlException
Reader for reading the
Clob value represented by the given locator based
Clob object.connection - connection to be used to read the
Clob value from the serverclob - Clob object that contains locator for
the Clob value on the server.pos - The offset to the first character of the partial value to be
retrieved.len - The length in characters of the partial value to be retrieved.SqlExceptionpublic int read()
throws IOException
read in class ReaderIOExceptionThis method fetches one character at a time from the server. For more
efficient retrieval, use #read(char[]).public int read(char[] c,
int off,
int len)
throws IOException
read in class ReaderIOExceptionReader.read(char[], int, int)public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionReader.close()Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.