com.continuent.tungsten.replicator.database
Class DatabaseHelper

java.lang.Object
  extended by com.continuent.tungsten.replicator.database.DatabaseHelper

public class DatabaseHelper
extends java.lang.Object

Implements helper methods for database operations.

Version:
1.0
Author:
Robert Hodges

Constructor Summary
DatabaseHelper()
           
 
Method Summary
static SerialBlob getSafeBlob(byte[] bytes)
          Create a serializable blob from a byte array.
static SerialBlob getSafeBlob(byte[] bytes, int off, int len)
          Create a serializable blob from a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseHelper

public DatabaseHelper()
Method Detail

getSafeBlob

public static SerialBlob getSafeBlob(byte[] bytes)
                              throws java.sql.SQLException
Create a serializable blob from a byte array.

Parameters:
bytes - Array from which to read
Throws:
java.sql.SQLException - Thrown if the safe blob cannot be instantiated.

getSafeBlob

public static SerialBlob getSafeBlob(byte[] bytes,
                                     int off,
                                     int len)
                              throws java.sql.SQLException
Create a serializable blob from a byte array.

Parameters:
bytes - Array from which to read
off - Offset into the array
len - Length to read from offset
Throws:
java.sql.SQLException - Thrown if the safe blob cannot be instantiated.