Package org.h2.value.lob
Class LobDataFetchOnDemand
- java.lang.Object
-
- org.h2.value.lob.LobData
-
- org.h2.value.lob.LobDataFetchOnDemand
-
public final class LobDataFetchOnDemand extends LobData
A implementation of the LOB data used on the client side of a remote H2 connection. Fetches the underlying on data from the server.
-
-
Field Summary
Fields Modifier and Type Field Description private SessionRemote
handler
protected byte[]
hmac
If this is a client-side ValueLobDb object returned by a ResultSet, the hmac acts a security cookie that the client can send back to the server to ask for data related to this LOB.private long
lobId
private int
tableId
If the LOB is managed by the one the LobStorageBackend classes, these are the unique key inside that storage.
-
Constructor Summary
Constructors Constructor Description LobDataFetchOnDemand(DataHandler handler, int tableId, long lobId, byte[] hmac)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataHandler
getDataHandler()
java.io.InputStream
getInputStream(long precision)
Get stream to read LOB data fromlong
getLobId()
int
getTableId()
Get the current table id of this lob.boolean
isLinkedToTable()
Check if this value is linked to a specific table.java.lang.String
toString()
-
-
-
Field Detail
-
handler
private SessionRemote handler
-
tableId
private final int tableId
If the LOB is managed by the one the LobStorageBackend classes, these are the unique key inside that storage.
-
lobId
private final long lobId
-
hmac
protected final byte[] hmac
If this is a client-side ValueLobDb object returned by a ResultSet, the hmac acts a security cookie that the client can send back to the server to ask for data related to this LOB.
-
-
Constructor Detail
-
LobDataFetchOnDemand
public LobDataFetchOnDemand(DataHandler handler, int tableId, long lobId, byte[] hmac)
-
-
Method Detail
-
isLinkedToTable
public boolean isLinkedToTable()
Check if this value is linked to a specific table. For values that are kept fully in memory, this method returns false.- Overrides:
isLinkedToTable
in classLobData
- Returns:
- true if it is
-
getTableId
public int getTableId()
Get the current table id of this lob.- Returns:
- the table id
-
getLobId
public long getLobId()
-
getInputStream
public java.io.InputStream getInputStream(long precision)
Description copied from class:LobData
Get stream to read LOB data from- Specified by:
getInputStream
in classLobData
- Parameters:
precision
- octet length of the stream, or -1 if unknown- Returns:
- stream to read LOB data from
-
getDataHandler
public DataHandler getDataHandler()
- Overrides:
getDataHandler
in classLobData
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-