DbStorage.manager
Class LobManager

java.lang.Object
  extended byDbStorage.manager.LobManager

public final class LobManager
extends java.lang.Object

This class implements the metods to storage LOB objects.


Field Summary
static long MAX_LOB_SIZE
           
 
Constructor Summary
LobManager()
           
 
Method Summary
static int read(DbStorageManager dbsm, long transactionNumber, PhysicalID id, long from, int maxLength, byte[] b, int off)
          Reads from a LOB datum and stores the readed in a byte array.
static void setSize(DbStorageManager dbsm, long transactionNumber, PhysicalID id, long newSize)
          Changes the size of the LOB datum.
static int write(DbStorageManager dbsm, long transactionNumber, PhysicalID id, long from, int maxLength, byte[] b, int off)
          Writes a byte array into a LOB datum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LOB_SIZE

public static final long MAX_LOB_SIZE
See Also:
Constant Field Values
Constructor Detail

LobManager

public LobManager()
Method Detail

setSize

public static void setSize(DbStorageManager dbsm,
                           long transactionNumber,
                           PhysicalID id,
                           long newSize)
                    throws storage.StorageException,
                           java.io.IOException,
                           OutOfLOBException
Changes the size of the LOB datum.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
id - The identifier of the datum to resize.
newSize - The new size of the datum.
Throws:
storage.StorageException
java.io.IOException
OutOfLOBException

write

public static int write(DbStorageManager dbsm,
                        long transactionNumber,
                        PhysicalID id,
                        long from,
                        int maxLength,
                        byte[] b,
                        int off)
                 throws storage.StorageException,
                        java.io.IOException,
                        OutOfLOBException
Writes a byte array into a LOB datum.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
id - The identifier of the datum to wrote.
from - The position of the LOB from which the witting starts.
maxLength - The maximum number of bytes to write.
b - The array contains the bytes to write.
off - The offset of b from which the bytes are retrieved.
Returns:
The number of written bytes.
Throws:
storage.StorageException
java.io.IOException
OutOfLOBException

read

public static int read(DbStorageManager dbsm,
                       long transactionNumber,
                       PhysicalID id,
                       long from,
                       int maxLength,
                       byte[] b,
                       int off)
                throws storage.StorageException,
                       java.io.IOException,
                       OutOfLOBException
Reads from a LOB datum and stores the readed in a byte array.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
id - The identifier of the datum to read.
from - The position of the LOB from which the reading starts.
maxLength - The maximum number of bytes to read.
b - The array where the readed bytes will be stored.
off - The offset of b from which the readed bytes are stored.
Returns:
The number of readed bytes.
Throws:
storage.StorageException
java.io.IOException
OutOfLOBException