|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.store.LobStorage
public class LobStorage
This class stores LOB objects in the database.
Nested Class Summary | |
---|---|
static class |
LobStorage.LobInputStream
An input stream that reads from a LOB. |
Field Summary | |
---|---|
static int |
TABLE_ID_SESSION_VARIABLE
The table id for session variables (LOBs not assigned to a table). |
static int |
TABLE_TEMP
The table id for temporary objects (not assigned to any object). |
Constructor Summary | |
---|---|
LobStorage(DataHandler handler)
|
Method Summary | |
---|---|
ValueLobDb |
copyLob(int type,
long oldLobId,
int tableId,
long length)
Copy a lob. |
Value |
createBlob(java.io.InputStream in,
long maxLength)
Create a BLOB object. |
Value |
createClob(java.io.Reader reader,
long maxLength)
Create a CLOB object. |
static Value |
createSmallLob(int type,
byte[] small)
Create a LOB object that fits in memory. |
java.io.InputStream |
getInputStream(long lobId)
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 |
setTable(long lobId,
int table)
Set the table reference of this lob. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TABLE_ID_SESSION_VARIABLE
public static final int TABLE_TEMP
Constructor Detail |
---|
public LobStorage(DataHandler handler)
Method Detail |
---|
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 array
public java.io.InputStream getInputStream(long lobId) throws java.io.IOException
lobId
- the lob id
java.io.IOException
public ValueLobDb copyLob(int type, long oldLobId, int tableId, long length)
type
- the typeoldLobId
- the old lob idtableId
- the new table idlength
- the length
public Value createBlob(java.io.InputStream in, long maxLength)
in
- the input streammaxLength
- the maximum length (-1 if not known)
public Value createClob(java.io.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 table
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |