Top Description Fields Constructors Methods
org.h2.store

public Class LobStorageFrontend

extends Object
implements LobStorageInterface
Class Inheritance
All Implemented Interfaces
org.h2.store.LobStorageInterface
Imports
java.io.IOException, .InputStream, .Reader, org.h2.engine.SessionRemote, org.h2.value.ValueBlob, .ValueClob, .ValueLob

This factory creates in-memory objects and temporary files. It is used on the client side.

Field Summary

Modifier and TypeField and Description
private final SessionRemote
public static final int
TABLE_ID_SESSION_VARIABLE

The table id for session variables (LOBs not assigned to a table).

public static final int
TABLE_RESULT

The table id for result sets.

public static final int
TABLE_TEMP

The table id for temporary objects (not assigned to any object).

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ValueLob
copyLob(ValueLob
the old lob
old
,
int
the new table id
tableId
)

Implements org.h2.store.LobStorageInterface.copyLob.

Copy a lob.

public ValueBlob
createBlob(InputStream
the input stream
in
,
long
the maximum length (-1 if not known)
maxLength
)

Implements org.h2.store.LobStorageInterface.createBlob.

Create a BLOB object.

public ValueClob

Returns:

the LOB
createClob
(Reader
the reader
reader
,
long
the maximum length (-1 if not known)
maxLength
)

Implements org.h2.store.LobStorageInterface.createClob.

Create a CLOB object.

public InputStream
getInputStream(long
the lob id
lobId
,
long
the number of bytes to read, or -1 if not known
byteCount
)

Implements org.h2.store.LobStorageInterface.getInputStream.

Get the input stream for the given lob, only called on server side of a TCP connection.

public InputStream
getInputStream(long
the lob id
lobId
,
int
the able id
tableId
,
long
the number of bytes to read, or -1 if not known
byteCount
)

Implements org.h2.store.LobStorageInterface.getInputStream.

Get the input stream for the given lob

public boolean
isReadOnly()

Implements org.h2.store.LobStorageInterface.isReadOnly.

Whether the storage is read-only

public void
removeAllForTable(int
the table id
tableId
)

Implements org.h2.store.LobStorageInterface.removeAllForTable.

Remove all LOBs for this table.

public void
removeLob(ValueLob
the lob
lob
)

Implements org.h2.store.LobStorageInterface.removeLob.

Delete a LOB (from the database, if it is stored there).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sessionRemoteback to summary
private final SessionRemote sessionRemote
TABLE_ID_SESSION_VARIABLEback to summary
public static final int TABLE_ID_SESSION_VARIABLE

The table id for session variables (LOBs not assigned to a table).

TABLE_RESULTback to summary
public static final int TABLE_RESULT

The table id for result sets.

TABLE_TEMPback to summary
public static final int TABLE_TEMP

The table id for temporary objects (not assigned to any object).

Constructor Detail

LobStorageFrontendback to summary
public LobStorageFrontend(SessionRemote handler)

Method Detail

copyLobback to summary
public ValueLob copyLob(ValueLob old, int tableId)

Implements org.h2.store.LobStorageInterface.copyLob.

Doc from org.h2.store.LobStorageInterface.copyLob.

Copy a lob.

Parameters
old:ValueLob

the old lob

tableId:int

the new table id

Returns:ValueLob

the new lob

Annotations
@Override
createBlobback to summary
public ValueBlob createBlob(InputStream in, long maxLength)

Implements org.h2.store.LobStorageInterface.createBlob.

Doc from org.h2.store.LobStorageInterface.createBlob.

Create a BLOB object.

Parameters
in:InputStream

the input stream

maxLength:long

the maximum length (-1 if not known)

Returns:ValueBlob

the LOB

Annotations
@Override
createClobback to summary
public ValueClob createClob(Reader reader, long maxLength)

Implements org.h2.store.LobStorageInterface.createClob.

Create a CLOB object.

Parameters
reader:Reader

the reader

maxLength:long

the maximum length (-1 if not known)

Returns:ValueClob

the LOB

Annotations
@Override
getInputStreamback to summary
public InputStream getInputStream(long lobId, long byteCount) throws IOException

Implements org.h2.store.LobStorageInterface.getInputStream.

Doc from org.h2.store.LobStorageInterface.getInputStream.

Get the input stream for the given lob, only called on server side of a TCP connection.

Parameters
lobId:long

the lob id

byteCount:long

the number of bytes to read, or -1 if not known

Returns:InputStream

the stream

Annotations
@Override
Exceptions
IOException:
on failure
getInputStreamback to summary
public InputStream getInputStream(long lobId, int tableId, long byteCount) throws IOException

Implements org.h2.store.LobStorageInterface.getInputStream.

Doc from org.h2.store.LobStorageInterface.getInputStream.

Get the input stream for the given lob

Parameters
lobId:long

the lob id

tableId:int

the able id

byteCount:long

the number of bytes to read, or -1 if not known

Returns:InputStream

the stream

Annotations
@Override
Exceptions
IOException:
on failure
isReadOnlyback to summary
public boolean isReadOnly()

Implements org.h2.store.LobStorageInterface.isReadOnly.

Doc from org.h2.store.LobStorageInterface.isReadOnly.

Whether the storage is read-only

Returns:boolean

true if yes

Annotations
@Override
removeAllForTableback to summary
public void removeAllForTable(int tableId)

Implements org.h2.store.LobStorageInterface.removeAllForTable.

Doc from org.h2.store.LobStorageInterface.removeAllForTable.

Remove all LOBs for this table.

Parameters
tableId:int

the table id

Annotations
@Override
removeLobback to summary
public void removeLob(ValueLob lob)

Implements org.h2.store.LobStorageInterface.removeLob.

Doc from org.h2.store.LobStorageInterface.removeLob.

Delete a LOB (from the database, if it is stored there).

Parameters
lob:ValueLob

the lob

Annotations
@Override