org.h2.store

## Interface LobStorageInterface

All Known Implementing Classes:
  LobStorageBackend, LobStorageFrontend, LobStorageMap

    public interface LobStorageInterface

A mechanism to store and retrieve lob data.

### Method Summary

Methods
`ValueLobDb` `copyLob(ValueLobDb old, int tableId, long length)` Copy a lob.
`Value` `createBlob(java.io.InputStream in, long maxLength)` Create a BLOB object.
`Value` `createClob(java.io.Reader reader, long maxLength)` Create a CLOB object.
`java.io.InputStream` `getInputStream(ValueLobDb lob, byte[] hmac, long byteCount)` Get the input stream for the given lob.
`void` `init()` Initialize the lob storage.
`boolean` `isReadOnly()` Whether the storage is read-only
`void` `removeAllForTable(int tableId)` Remove all LOBs for this table.
`void` `removeLob(ValueLobDb lob)` Delete a LOB (from the database, if it is stored there).
`void` `setTable(ValueLobDb lob, int table)` Set the table reference of this lob.

### Method Detail

#### createClob

    Value createClob(java.io.Reader reader,
                   long maxLength)

Create a CLOB object.

Parameters:
  `reader` - the reader
  `maxLength` - the maximum length (-1 if not known)
Returns:
  the LOB

#### createBlob

    Value createBlob(java.io.InputStream in,
                   long maxLength)

Create a BLOB object.

Parameters:
  `in` - the input stream
  `maxLength` - the maximum length (-1 if not known)
Returns:
  the LOB

#### copyLob

    ValueLobDb copyLob(ValueLobDb old,
                     int tableId,
                     long length)

Copy a lob.

Parameters:
  `old` - the old lob
  `tableId` - the new table id
  `length` - the length
Returns:
  the new lob

#### getInputStream

    java.io.InputStream getInputStream(ValueLobDb lob,
                                     byte[] hmac,
                                     long byteCount)
                                       throws java.io.IOException

Get the input stream for the given lob.

Parameters:
  `lob` - the lob id
  `hmac` - the message authentication code (for remote input streams)
  `byteCount` - the number of bytes to read, or -1 if not known
Returns:
  the stream
Throws:
  `java.io.IOException`

#### setTable

    void setTable(ValueLobDb lob,
                int table)

Set the table reference of this lob.

Parameters:
  `lob` - the lob
  `table` - the table

#### removeLob

    void removeLob(ValueLobDb lob)

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

#### init

    void init()

Initialize the lob storage.

#### isReadOnly

    boolean isReadOnly()

Whether the storage is read-only

Returns:
  true if yes