java.io.Closeable, java.lang.AutoCloseableUpdateSensitiveBlobLocatorInputStream, UpdateSensitiveClobLocatorInputStreamabstract class UpdateSensitiveLOBLocatorInputStream
extends java.io.InputStream
| Modifier and Type | Field | Description |
|---|---|---|
protected ClientConnection |
con |
|
protected long |
currentPos |
|
private java.io.BufferedInputStream |
is |
|
protected long |
length |
|
private Lob |
lob |
|
private long |
updateCount |
| Modifier | Constructor | Description |
|---|---|---|
protected |
UpdateSensitiveLOBLocatorInputStream(ClientConnection con,
Lob lob,
java.io.InputStream is) |
Initializes the InputStream, updateCount, currentPos
and the connection to the appropriate values.
|
protected |
UpdateSensitiveLOBLocatorInputStream(ClientConnection con,
Lob lob,
java.io.InputStream is,
long pos,
long len) |
Initializes the InputStream, 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 LOB object and if it does
not it recreates the stream.
|
int |
read() |
|
int |
read(byte[] b,
int off,
int len) |
|
protected abstract java.io.InputStream |
reCreateStream() |
Abstract method that will be implemented by
the underlying streams specific to Clob and
Blob.
|
private java.io.BufferedInputStream is
protected ClientConnection con
private Lob lob
private long updateCount
protected long currentPos
protected long length
protected UpdateSensitiveLOBLocatorInputStream(ClientConnection con, Lob lob, java.io.InputStream is) throws SqlException
con - connection to be used to read the
Lob value from the serverlob - Lob object which could be a
Blob or a Clob.is - an InputStream that contains the
appropriate locator stream instance.SqlExceptionprotected UpdateSensitiveLOBLocatorInputStream(ClientConnection con, Lob lob, java.io.InputStream is, long pos, long len) throws SqlException
con - connection to be used to read the
Lob value from the serverlob - 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.SqlExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionInputStream.read()public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionInputStream.read(byte[], int, int)public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOExceptionprivate void identifyAndReplaceObseleteStream()
throws java.io.IOException
java.io.IOException - If any exception occurs upon
Locator stream creation.protected abstract java.io.InputStream reCreateStream()
throws SqlException
SqlExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.