org.brains2b.data.sql.lob
Class LobHelper

java.lang.Object
  extended by org.brains2b.data.sql.lob.LobHelper

public class LobHelper
extends java.lang.Object

Helper method to create Clob, Blob and Streams either on the basis of the objects supplied or for creating new Objects

Version:
0.90 [Apr 9, 2008]
Author:
dennis@brains2b.nl

Constructor Summary
LobHelper()
           
 
Method Summary
static java.sql.Blob createBlob()
          create a new empty Blob
static java.sql.Blob createBlob(java.sql.Blob blob)
          create a wrapper around an existing Blob
static java.sql.Clob createClob()
          create a new empty Clob
static java.sql.Clob createClob(java.sql.Clob clob)
          create a wrapper around an existing Clob
static org.brains2b.sql.meta.types.Stream createStream()
          create a new empty Stream
static org.brains2b.sql.meta.types.Stream createStream(java.io.InputStream is, boolean disconnected)
          create a Stream object for the InputStream from the database, that can then be used to change the content by using Stream.getOutputStream()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LobHelper

public LobHelper()
Method Detail

createClob

public static final java.sql.Clob createClob()
create a new empty Clob

Returns:
Clob

createClob

public static final java.sql.Clob createClob(java.sql.Clob clob)
create a wrapper around an existing Clob

Parameters:
clob - Clob
Returns:
Clob, actually the ClobImpl that act as a wrapper

createBlob

public static final java.sql.Blob createBlob()
create a new empty Blob

Returns:
Blob

createBlob

public static final java.sql.Blob createBlob(java.sql.Blob blob)
create a wrapper around an existing Blob

Parameters:
blob - Blob
Returns:
Blob, actually the BlobImpl that act as a wrapper

createStream

public static final org.brains2b.sql.meta.types.Stream createStream(java.io.InputStream is,
                                                                    boolean disconnected)
create a Stream object for the InputStream from the database, that can then be used to change the content by using Stream.getOutputStream()

Parameters:
is - InputStream
disconnected - boolean
Returns:
Stream

createStream

public static final org.brains2b.sql.meta.types.Stream createStream()
create a new empty Stream

Returns:
Stream