Package org.h2.store
Interface LobStorageInterface
- All Known Implementing Classes:
LobStorageFrontend
,LobStorageMap
public interface LobStorageInterface
A mechanism to store and retrieve lob data.
-
Method Summary
Modifier and TypeMethodDescriptionCopy a lob.createBlob
(InputStream in, long maxLength) Create a BLOB object.createClob
(Reader reader, long maxLength) Create a CLOB object.getInputStream
(long lobId, int tableId, long byteCount) Get the input stream for the given lobgetInputStream
(long lobId, long byteCount) Get the input stream for the given lob, only called on server side of a TCP connection.boolean
Whether the storage is read-onlyvoid
removeAllForTable
(int tableId) Remove all LOBs for this table.void
Delete a LOB (from the database, if it is stored there).
-
Method Details
-
createClob
Create a CLOB object.- Parameters:
reader
- the readermaxLength
- the maximum length (-1 if not known)- Returns:
- the LOB
-
createBlob
Create a BLOB object.- Parameters:
in
- the input streammaxLength
- the maximum length (-1 if not known)- Returns:
- the LOB
-
copyLob
Copy a lob.- Parameters:
old
- the old lobtableId
- the new table id- Returns:
- the new lob
-
getInputStream
Get the input stream for the given lob, only called on server side of a TCP connection.- Parameters:
lobId
- the lob idbyteCount
- the number of bytes to read, or -1 if not known- Returns:
- the stream
- Throws:
IOException
- on failure
-
getInputStream
Get the input stream for the given lob- Parameters:
lobId
- the lob idtableId
- the able idbyteCount
- the number of bytes to read, or -1 if not known- Returns:
- the stream
- Throws:
IOException
- on failure
-
removeLob
Delete a LOB (from the database, if it is stored there).- Parameters:
lob
- the lob
-
removeAllForTable
void removeAllForTable(int tableId) Remove all LOBs for this table.- Parameters:
tableId
- the table id
-
isReadOnly
boolean isReadOnly()Whether the storage is read-only- Returns:
- true if yes
-