java.io.Closeable
, java.lang.AutoCloseable
, java.lang.Readable
class UpdateSensitiveClobLocatorReader
extends java.io.Reader
Modifier and Type | Field | Description |
---|---|---|
private ClientClob |
clob |
|
private ClientConnection |
con |
|
private long |
currentPos |
|
private long |
length |
|
private java.io.BufferedReader |
r |
|
private long |
updateCount |
Modifier | Constructor | Description |
---|---|---|
protected |
UpdateSensitiveClobLocatorReader(ClientConnection con,
ClientClob clob) |
Initializes the Reader, updateCount, currentPos
and the connection to the appropriate values.
|
protected |
UpdateSensitiveClobLocatorReader(ClientConnection con,
ClientClob clob,
long pos,
long len) |
Initializes the Reader, updateCount, currentPos,
length and the connection to the appropriate values.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
private void |
identifyAndReplaceObseleteStream() |
Verifies whether the current updateCount matches
the updateCount of the Clob object and if it does
not it recreates the stream.
|
int |
read() |
|
int |
read(char[] c,
int off,
int len) |
|
private java.io.Reader |
reCreateStream() |
Re-creates the underlying Locator stream
with the current position and the length
values if specified.
|
private java.io.BufferedReader r
private ClientConnection con
private ClientClob clob
private long updateCount
private long currentPos
private long length
protected UpdateSensitiveClobLocatorReader(ClientConnection con, ClientClob clob) throws SqlException
con
- connection to be used to read the
Clob
value from the serverclob
- the Clob
object associated with
this stream.SqlException
protected UpdateSensitiveClobLocatorReader(ClientConnection con, ClientClob clob, long pos, long len) throws SqlException
con
- connection to be used to read the
Clob
value from the serverclob
- the Clob
object associated with
this reader.pos
- the position from which the first read begins.len
- the length in bytes of the partial value to be
retrieved.SqlException
public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
Reader.read()
public int read(char[] c, int off, int len) throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
Reader.read(char[], int, int)
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
close
in class java.io.Reader
java.io.IOException
Reader.close()
private void identifyAndReplaceObseleteStream() throws java.io.IOException
java.io.IOException
- If any exception occurs upon
Locator stream creation.private java.io.Reader reCreateStream() throws SqlException
SqlException
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.