InputStream that will use an locator to fetch the
Clob value from the server.
Closing a ByteArrayInputStream has no effect. The methods in
this class can be called after the stream has been closed without
generating an IOException.
This InputStream implementation is pretty basic. No
buffering of data is done. Hence, for efficiency #read(byte[])
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. |
| Access | Constructor and Description |
|---|---|
| pack-priv | ClobLocatorInputStream(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 | ClobLocatorInputStream(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 position inside the pos)ClobCreate an |
| Modifier and Type | Method and Description |
|---|---|
| private byte[] | Returns: TheByte corresponding
to the String that was
input.the input str)String.Returns a |
| public int | read()
Implements abstract java. |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. len bytes of data from the input stream into
an array of bytes.
|
| private byte[] | Returns: byte[] containing the read bytesnumber of bytes 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 | |
| ClobLocatorInputStream | back to summary |
|---|---|
| pack-priv ClobLocatorInputStream(ClientConnection connection, ClientClob clob) throws SqlException Create an
| |
| ClobLocatorInputStream | back to summary |
|---|---|
| pack-priv ClobLocatorInputStream(ClientConnection connection, ClientClob clob, long pos) throws SqlException Create an
| |
| getBytesFromString | back to summary |
|---|---|
| private byte[] getBytesFromString(String str) Returns a
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |
| readBytes | back to summary |
|---|---|
| private byte[] readBytes(int len) throws IOException Read the next
| |