wt.pds
Class ChunkLobHandler

java.lang.Object
  extended bywt.pds.AbstractLobHandler
      extended bywt.pds.ChunkLobHandler
All Implemented Interfaces:
LobHandler
Direct Known Subclasses:
DBMSLobHandler, StandardLobHandler81

public abstract class ChunkLobHandler
extends AbstractLobHandler

This abstract class provides capabilities for reading and writing Lob data in chunks. Subclass implementations must provide a mechanism for this capability.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
 
Fields inherited from class wt.pds.AbstractLobHandler
DEBUG
 
Constructor Summary
ChunkLobHandler()
           
 
Method Summary
protected abstract  long getLobLength(WTConnection a_connection, Object a_blob)
          Returns the length of the specified LOB.
 long setLob(WTConnection a_connection, LobLocator a_lobLocator, InputStream a_inputStream)
          Set the data in the InputStream to the specified LOB.
 void setLob(WTConnection a_connection, LobLocator a_lobLocator, InputStream a_inputStream, long a_length)
          Set the data in the InputStream to the specified LOB.
protected abstract  void setLobLength(WTConnection a_connection, Object a_blob, long a_length)
          Set the length of the specified LOB.
 void setObjectAsLob(WTConnection a_connection, LobLocator a_lobLocator, Object a_object)
          Set the object as LOB.
protected abstract  void write(WTConnection a_connection, Object a_blob, long a_blobOffset, InputStream a_inputStream, long a_length)
          Writes the data to the specified LOB.
 
Methods inherited from class wt.pds.AbstractLobHandler
findLocator, getBlob, getLob, getLobAsByteArray, getLobAsObject, setBlob, streamAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

ChunkLobHandler

public ChunkLobHandler()
Method Detail

setLobLength

protected abstract void setLobLength(WTConnection a_connection,
                                     Object a_blob,
                                     long a_length)
                              throws DatastoreException
Set the length of the specified LOB.

Supported API: false

Parameters:
a_connection -
a_blob -
a_length -
Throws:
DatastoreException

getLobLength

protected abstract long getLobLength(WTConnection a_connection,
                                     Object a_blob)
                              throws DatastoreException
Returns the length of the specified LOB.

Supported API: false

Parameters:
a_connection -
a_blob -
Returns:
long
Throws:
DatastoreException

write

protected abstract void write(WTConnection a_connection,
                              Object a_blob,
                              long a_blobOffset,
                              InputStream a_inputStream,
                              long a_length)
                       throws WTIOException
Writes the data to the specified LOB.

Supported API: false

Parameters:
a_connection - Connection to the database.
a_blob - Blob object reference to the data
a_blobOffset - Offset into the Blob data to begin writing
a_inputStream - Offset into the buffer data to begin writing from
a_length - Number of bytes to write
Throws:
WTIOException

setLob

public void setLob(WTConnection a_connection,
                   LobLocator a_lobLocator,
                   InputStream a_inputStream,
                   long a_length)
            throws DatastoreException
Set the data in the InputStream to the specified LOB.

Supported API: false

Specified by:
setLob in interface LobHandler
Specified by:
setLob in class AbstractLobHandler
Parameters:
a_connection - Connection to the database
a_lobLocator - specifies the Lob column
a_inputStream - Data stream for input to the lob
a_length - Number of bytes to set
Throws:
DatastoreException

setLob

public long setLob(WTConnection a_connection,
                   LobLocator a_lobLocator,
                   InputStream a_inputStream)
            throws DatastoreException
Set the data in the InputStream to the specified LOB.

Supported API: false

Specified by:
setLob in interface LobHandler
Specified by:
setLob in class AbstractLobHandler
Parameters:
a_connection - Connection to the database
a_lobLocator - specifies the Lob column
a_inputStream - Data stream for input to the lob
Returns:
long
Throws:
DatastoreException

setObjectAsLob

public void setObjectAsLob(WTConnection a_connection,
                           LobLocator a_lobLocator,
                           Object a_object)
                    throws DatastoreException
Set the object as LOB.

Supported API: false

Specified by:
setObjectAsLob in interface LobHandler
Specified by:
setObjectAsLob in class AbstractLobHandler
Parameters:
a_connection - Connection to the database
a_lobLocator - specifies the Lob column
a_object - Object to set
Throws:
DatastoreException