Class UpdateSensitiveLOBLocatorInputStream

java.lang.Object
java.io.InputStream
org.apache.derby.client.am.UpdateSensitiveLOBLocatorInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
UpdateSensitiveBlobLocatorInputStream, UpdateSensitiveClobLocatorInputStream

abstract class UpdateSensitiveLOBLocatorInputStream extends InputStream
Super-class of the Update sensitive locator streams. Before a read operation if performed on the stream this stream verifies that the underlying LOB has not changed and if it has it recreates the specific streams. Since Locator streams are specific to Blob and Clob the sub-classes would take care of creating the appropriate streams.
  • Field Details

    • is

      private BufferedInputStream is
    • con

      protected ClientConnection con
    • lob

      private Lob lob
    • updateCount

      private long updateCount
    • currentPos

      protected long currentPos
    • length

      protected long length
  • Constructor Details

    • UpdateSensitiveLOBLocatorInputStream

      protected UpdateSensitiveLOBLocatorInputStream(ClientConnection con, Lob lob, InputStream is) throws SqlException
      Initializes the InputStream, updateCount, currentPos and the connection to the appropriate values.
      Parameters:
      con - connection to be used to read the Lob value from the server
      lob - Lob object which could be a Blob or a Clob.
      is - an InputStream that contains the appropriate locator stream instance.
      Throws:
      SqlException
    • UpdateSensitiveLOBLocatorInputStream

      protected UpdateSensitiveLOBLocatorInputStream(ClientConnection con, Lob lob, InputStream is, long pos, long len) throws SqlException
      Initializes the InputStream, updateCount, currentPos, length and the connection to the appropriate values.
      Parameters:
      con - connection to be used to read the Lob value from the server
      lob - Lob object which could be a Blob or a Clob.
      is - an InputStream that contains the appropriate locator stream instance.
      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