Package org.apache.derby.client.am
Class UpdateSensitiveBlobLocatorInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.derby.client.am.UpdateSensitiveLOBLocatorInputStream
-
- org.apache.derby.client.am.UpdateSensitiveBlobLocatorInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class UpdateSensitiveBlobLocatorInputStream extends UpdateSensitiveLOBLocatorInputStream
This class extends from the UpdateSensitiveLOBLocatorInputStream and creates and returns an implementation of the Blob specific locator InputStream. It also over-rides the reCreateStream method which re-creates the underlying Blob locator stream whenever a update happens on the Blob object associated with this stream.
-
-
Field Summary
Fields Modifier and Type Field Description private ClientBlob
blob
-
Fields inherited from class org.apache.derby.client.am.UpdateSensitiveLOBLocatorInputStream
con, currentPos, length
-
-
Constructor Summary
Constructors Constructor Description UpdateSensitiveBlobLocatorInputStream(ClientConnection con, ClientBlob blob)
Creates an instance of the BlobLocatorInputStream and and calls the super class constructors with appropriate initializers.UpdateSensitiveBlobLocatorInputStream(ClientConnection con, ClientBlob blob, long position, long length)
Creates an instance of the BlobLocatorInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.InputStream
reCreateStream()
Re-creates the underlying Locator stream with the current position and the length values if specified.-
Methods inherited from class org.apache.derby.client.am.UpdateSensitiveLOBLocatorInputStream
close, read, read
-
-
-
-
Field Detail
-
blob
private ClientBlob blob
-
-
Constructor Detail
-
UpdateSensitiveBlobLocatorInputStream
UpdateSensitiveBlobLocatorInputStream(ClientConnection con, ClientBlob blob) throws SqlException
Creates an instance of the BlobLocatorInputStream and and calls the super class constructors with appropriate initializers.- Parameters:
con
- connection to be used to read theBlob
value from the serverblob
-Blob
object that contains locator for theBlob
value on the server.- Throws:
SqlException
- If any exception occurs during stream creation.
-
UpdateSensitiveBlobLocatorInputStream
UpdateSensitiveBlobLocatorInputStream(ClientConnection con, ClientBlob blob, long position, long length) throws SqlException
Creates an instance of the BlobLocatorInputStream.- Parameters:
con
- connection to be used to read theBlob
value from the serverblob
-Blob
object that contains locator for theBlob
value on the server.position
- the position in theBlob
of the first byte to read.length
- the maximum number of bytes to read from theBlob
.- Throws:
SqlException
- If any exception occurs during stream creation.
-
-
Method Detail
-
reCreateStream
protected java.io.InputStream reCreateStream() throws SqlException
Re-creates the underlying Locator stream with the current position and the length values if specified.- Specified by:
reCreateStream
in classUpdateSensitiveLOBLocatorInputStream
- Throws:
SqlException
- If any exception occurs while re-creating the underlying streams.
-
-