Top Description Methods
org.h2.store

public Interface LobStorageInterface

Known Direct Implementers
org.h2.mvstore.db.LobStorageMap, org.h2.store.LobStorageFrontend
Imports
java.io.IOException, .InputStream, .Reader, org.h2.value.ValueBlob, .ValueClob, .ValueLob

A mechanism to store and retrieve lob data.

Method Summary

Modifier and TypeMethod and Description
public default void
close()

Close LobStorage and release all resources

public ValueLob

Returns:

the new lob
copyLob
(ValueLob
the old lob
old
,
int
the new table id
tableId
)

Copy a lob.

public ValueBlob

Returns:

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

Create a BLOB object.

public ValueClob

Returns:

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

Create a CLOB object.

public InputStream

Returns:

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

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

public InputStream

Returns:

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

Get the input stream for the given lob

public boolean

Returns:

true if yes
isReadOnly
()

Whether the storage is read-only

public void
removeAllForTable(int
the table id
tableId
)

Remove all LOBs for this table.

public void
removeLob(ValueLob
the lob
lob
)

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

Method Detail

closeback to summary
public default void close()

Close LobStorage and release all resources

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

Copy a lob.

Parameters
old:ValueLob

the old lob

tableId:int

the new table id

Returns:ValueLob

the new lob

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

Create a BLOB object.

Parameters
in:InputStream

the input stream

maxLength:long

the maximum length (-1 if not known)

Returns:ValueBlob

the LOB

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

Create a CLOB object.

Parameters
reader:Reader

the reader

maxLength:long

the maximum length (-1 if not known)

Returns:ValueClob

the LOB

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

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

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

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

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

Whether the storage is read-only

Returns:boolean

true if yes

removeAllForTableback to summary
public void removeAllForTable(int tableId)

Remove all LOBs for this table.

Parameters
tableId:int

the table id

removeLobback to summary
public void removeLob(ValueLob lob)

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

Parameters
lob:ValueLob

the lob