Top Description Fields Constructors Methods
org.h2.value.lob

public final Class LobDataFetchOnDemand

extends LobData
Class Inheritance
Imports
java.io.BufferedInputStream, .InputStream, org.h2.engine.SessionRemote, org.h2.store.DataHandler, .LobStorageRemoteInputStream

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

Modifier and TypeField and Description
private SessionRemote
private 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.

private final long
private final int
tableId

If the LOB is managed by the one the LobStorageBackend classes, these are the unique key inside that storage.

Constructor Summary

AccessConstructor and Description
public
LobDataFetchOnDemand(DataHandler handler, int tableId, long lobId, byte[] hmac)

Method Summary

Modifier and TypeMethod and Description
public DataHandler
public InputStream
getInputStream(long
octet length of the stream, or -1 if unknown
precision
)

Implements abstract org.h2.value.lob.LobData.getInputStream.

Get stream to read LOB data from

public long
public int

Returns:

the table id
getTableId
()

Get the current table id of this lob.

public boolean

Returns:

true if it is
isLinkedToTable
()

Overrides org.h2.value.lob.LobData.isLinkedToTable.

Check if this value is linked to a specific table.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.value.lob.LobData:
getMemoryremove

Field Detail

handlerback to summary
private SessionRemote handler
hmacback to summary
private 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.

lobIdback to summary
private final long lobId
tableIdback to summary
private final int tableId

If the LOB is managed by the one the LobStorageBackend classes, these are the unique key inside that storage.

Constructor Detail

LobDataFetchOnDemandback to summary
public LobDataFetchOnDemand(DataHandler handler, int tableId, long lobId, byte[] hmac)

Method Detail

getDataHandlerback to summary
public DataHandler getDataHandler()

Overrides org.h2.value.lob.LobData.getDataHandler.

Annotations
@Override
getInputStreamback to summary
public InputStream getInputStream(long precision)

Implements abstract org.h2.value.lob.LobData.getInputStream.

Doc from org.h2.value.lob.LobData.getInputStream.

Get stream to read LOB data from

Parameters
precision:long

octet length of the stream, or -1 if unknown

Returns:InputStream

stream to read LOB data from

Annotations
@Override
getLobIdback to summary
public long getLobId()
getTableIdback to summary
public int getTableId()

Get the current table id of this lob.

Returns:int

the table id

isLinkedToTableback to summary
public boolean isLinkedToTable()

Overrides org.h2.value.lob.LobData.isLinkedToTable.

Check if this value is linked to a specific table. For values that are kept fully in memory, this method returns false.

Returns:boolean

true if it is

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override