public class LobStorage extends Object
| Modifier and Type | Class and Description | 
|---|---|
| class  | LobStorage.LobInputStreamAn input stream that reads from a LOB. | 
| Modifier and Type | Field and Description | 
|---|---|
| static String | LOB_DATA_TABLEThe name of the lob data table. | 
| static int | TABLE_ID_SESSION_VARIABLEThe table id for session variables (LOBs not assigned to a table). | 
| static int | TABLE_TEMPThe table id for temporary objects (not assigned to any object). | 
| Constructor and Description | 
|---|
| LobStorage(DataHandler handler) | 
| Modifier and Type | Method and Description | 
|---|---|
| ValueLobDb | copyLob(int type,
       long oldLobId,
       int tableId,
       long length)Copy a lob. | 
| Value | createBlob(InputStream in,
          long maxLength)Create a BLOB object. | 
| Value | createClob(Reader reader,
          long maxLength)Create a CLOB object. | 
| static Value | createSmallLob(int type,
              byte[] small)Create a LOB object that fits in memory. | 
| InputStream | getInputStream(long lobId,
              long byteCount)Get the input stream for the given lob. | 
| void | init()Initialize the lob storage. | 
| void | removeAllForTable(int tableId)Remove all LOBs for this table. | 
| void | removeLob(long lob)Delete a LOB from the database. | 
| void | setTable(long lobId,
        int table)Set the table reference of this lob. | 
public static final int TABLE_ID_SESSION_VARIABLE
public static final int TABLE_TEMP
public static final String LOB_DATA_TABLE
public LobStorage(DataHandler handler)
public void init()
public void removeAllForTable(int tableId)
tableId - the table idpublic static Value createSmallLob(int type, byte[] small)
type - the value typesmall - the byte arraypublic void removeLob(long lob)
lob - the lob idpublic InputStream getInputStream(long lobId, long byteCount) throws IOException
lobId - the lob idbyteCount - the number of bytes to read, or -1 if not knownIOExceptionpublic ValueLobDb copyLob(int type, long oldLobId, int tableId, long length)
type - the typeoldLobId - the old lob idtableId - the new table idlength - the lengthpublic Value createBlob(InputStream in, long maxLength)
in - the input streammaxLength - the maximum length (-1 if not known)public Value createClob(Reader reader, long maxLength)
reader - the readermaxLength - the maximum length (-1 if not known)public void setTable(long lobId,
            int table)
lobId - the lobtable - the tableCopyright © 2012 JBoss by Red Hat. All Rights Reserved.