wt.pds
Class DBMSLobHandler

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

public class DBMSLobHandler
extends ChunkLobHandler

This abstract class provides common basic Lob handling operations in terms of low level DBMS_LOB package access APIs.

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
DBMSLobHandler()
           
 
Method Summary
 InputStream getLob(WTConnection a_connection, Object a_blob)
          Gets the data from the specified LOB as an InputStream.
protected  long getLobLength(WTConnection a_connection, Object a_blob)
          Returns the length of the specified LOB.
protected  long read(WTConnection a_connection, Object a_blob, long a_blobOffset, byte[] a_buffer, int a_bufferOffset, int a_length)
          Reads the data fromt the specified LOB.
protected  void setLobLength(WTConnection a_connection, Object a_blob, long a_length)
          Set the length of the specified LOB.
protected  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.ChunkLobHandler
setLob, setLob, setObjectAsLob
 
Methods inherited from class wt.pds.AbstractLobHandler
findLocator, getBlob, 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

DBMSLobHandler

public DBMSLobHandler()
Method Detail

setLobLength

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

Supported API: false

Specified by:
setLobLength in class ChunkLobHandler
Parameters:
a_connection -
a_blob -
a_length -
Throws:
DatastoreException

getLobLength

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

Supported API: false

Specified by:
getLobLength in class ChunkLobHandler
Parameters:
a_connection -
a_blob -
Returns:
long
Throws:
DatastoreException

write

protected 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

Specified by:
write in class ChunkLobHandler
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

read

protected long read(WTConnection a_connection,
                    Object a_blob,
                    long a_blobOffset,
                    byte[] a_buffer,
                    int a_bufferOffset,
                    int a_length)
             throws WTIOException
Reads the data fromt 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 reading from
a_buffer - Buffer of data to write to
a_bufferOffset - Offset into the buffer data to begin writing
a_length - Number of bytes to read
Returns:
long
Throws:
WTIOException

getLob

public InputStream getLob(WTConnection a_connection,
                          Object a_blob)
                   throws DatastoreException
Gets the data from the specified LOB as an InputStream.

Supported API: false

Specified by:
getLob in interface LobHandler
Overrides:
getLob in class AbstractLobHandler
Parameters:
a_connection - Connection to the database
a_blob - Blob reference to the data
Returns:
InputStream
Throws:
DatastoreException