Class UpdateSensitiveClobLocatorReader

java.lang.Object
java.io.Reader
org.apache.derby.client.am.UpdateSensitiveClobLocatorReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable

class UpdateSensitiveClobLocatorReader extends Reader
Wraps a Buffered Clob locator reader and watches out for updates on the Clob associated with it. Before a read operation is performed on the Reader this stream verifies that the underlying Clob has not changed and if it has it recreates the specific streams.
  • Field Details

    • r

      private BufferedReader r
    • con

      private ClientConnection con
    • clob

      private ClientClob clob
    • updateCount

      private long updateCount
    • currentPos

      private long currentPos
    • length

      private long length
  • Constructor Details

    • UpdateSensitiveClobLocatorReader

      protected UpdateSensitiveClobLocatorReader(ClientConnection con, ClientClob clob) throws SqlException
      Initializes the Reader, updateCount, currentPos and the connection to the appropriate values.
      Parameters:
      con - connection to be used to read the Clob value from the server
      clob - the Clob object associated with this stream.
      Throws:
      SqlException
    • UpdateSensitiveClobLocatorReader

      protected UpdateSensitiveClobLocatorReader(ClientConnection con, ClientClob clob, long pos, long len) throws SqlException
      Initializes the Reader, updateCount, currentPos, length and the connection to the appropriate values.
      Parameters:
      con - connection to be used to read the Clob value from the server
      clob - 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.
      Throws:
      SqlException
  • Method Details