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 efficiency #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.
| Modifier and Type | Field and Description |
|---|---|
| private final ClientClob | clob
The Clob to be accessed. |
| private final ClientConnection | connection
Connection used to read Clob from server. |
| private long | currentPos
Current position in the underlying Clob. |
| private boolean | isClosed
Stores the information to whether this Reader has been closed or not. |
| private final long | maxPos
Position in Clob where to stop reading. |
| Access | Constructor and Description |
|---|---|
| pack-priv | ClobLocatorReader(ClientConnection
connection to be used to read the
connection, ClientClob Clob value from the serverClob object that contains locator for
the Clob value on the server.Create an |
| pack-priv | ClobLocatorReader(ClientConnection
connection to be used to read the
connection, ClientClob Clob value from the serverClob object that contains locator for
the Clob value on the server.The offset to the first character of the partial value to be
retrieved. pos, long The length in characters of the partial value to be retrieved. len)Create an |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Implements abstract java. Implements java. |
| public int | |
| public int | read(char[]
Destination buffer c, int Offset at which to start storing characters off, int Maximum number of characters to read len)Implements abstract java. |
| private char[] | Returns: char[] containing the read characters.number of characters to read. len)Read the next |
| clob | back to summary |
|---|---|
| private final ClientClob clob The Clob to be accessed. | |
| connection | back to summary |
|---|---|
| private final ClientConnection connection Connection used to read Clob from server. | |
| currentPos | back to summary |
|---|---|
| private long currentPos Current position in the underlying Clob. Clobs are indexed from 1 | |
| isClosed | back to summary |
|---|---|
| private boolean isClosed Stores the information to whether this Reader has been closed or not. Is set to true if close() has been called. Is false otherwise. | |
| maxPos | back to summary |
|---|---|
| private final long maxPos Position in Clob where to stop reading. maxPos starts counting from 1. | |
| ClobLocatorReader | back to summary |
|---|---|
| pack-priv ClobLocatorReader(ClientConnection connection, ClientClob clob) throws SqlException Create an
| |
| ClobLocatorReader | back to summary |
|---|---|
| pack-priv ClobLocatorReader(ClientConnection connection, ClientClob clob, long pos, long len) throws SqlException Create an
| |
| checkClosed | back to summary |
|---|---|
| private void checkClosed() throws IOException Check to see if this
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
| |
| read | back to summary |
|---|---|
| public int read(char[] c, int off, int len) throws IOException Implements abstract java. Doc from java. Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If
| |
| readCharacters | back to summary |
|---|---|
| private char[] readCharacters(int len) throws IOException Read the next
| |