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:
Closeable,AutoCloseable
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
FieldsFields inherited from class org.apache.derby.client.am.UpdateSensitiveLOBLocatorInputStream
con, currentPos, length -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionprotected InputStreamRe-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, readMethods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
blob
-
-
Constructor Details
-
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 theBlobvalue from the serverblob-Blobobject that contains locator for theBlobvalue 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 theBlobvalue from the serverblob-Blobobject that contains locator for theBlobvalue on the server.position- the position in theBlobof 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 Details
-
reCreateStream
Re-creates the underlying Locator stream with the current position and the length values if specified.- Specified by:
reCreateStreamin classUpdateSensitiveLOBLocatorInputStream- Throws:
SqlException- If any exception occurs while re-creating the underlying streams.
-