org.apache.derby.client.am
Class UpdateSensitiveBlobLocatorInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.apache.derby.client.am.UpdateSensitiveLOBLocatorInputStream
          extended by org.apache.derby.client.am.UpdateSensitiveBlobLocatorInputStream
All Implemented Interfaces:
java.io.Closeable

public 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
private  Blob blob
           
 
Fields inherited from class org.apache.derby.client.am.UpdateSensitiveLOBLocatorInputStream
con, currentPos, length
 
Constructor Summary
UpdateSensitiveBlobLocatorInputStream(Connection con, Blob blob)
          Creates an instance of the BlobLocatorInputStream and and calls the super class constructors with appropriate initializers.
UpdateSensitiveBlobLocatorInputStream(Connection con, Blob blob, long position, long length)
          Creates an instance of the BlobLocatorInputStream.
 
Method Summary
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
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blob

private Blob blob
Constructor Detail

UpdateSensitiveBlobLocatorInputStream

public UpdateSensitiveBlobLocatorInputStream(Connection con,
                                             Blob 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 the Blob value from the server
blob - Blob object that contains locator for the Blob value on the server.
Throws:
SqlException - If any exception occurs during stream creation.

UpdateSensitiveBlobLocatorInputStream

public UpdateSensitiveBlobLocatorInputStream(Connection con,
                                             Blob blob,
                                             long position,
                                             long length)
                                      throws SqlException
Creates an instance of the BlobLocatorInputStream.

Parameters:
con - connection to be used to read the Blob value from the server
blob - Blob object that contains locator for the Blob value on the server.
position - the position in the Blob of the first byte to read.
length - the maximum number of bytes to read from the Blob.
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 class UpdateSensitiveLOBLocatorInputStream
Throws:
SqlException - If any exception occurs while re-creating the underlying streams.

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.