org.h2.store

## Interface LobStorageInterface

All Known Implementing Classes:
  LobStorageFrontend, LobStorageMap

    public interface LobStorageInterface

A mechanism to store and retrieve lob data.

### Method Summary

All Methods Instance Methods Abstract Methods
`ValueLob` `copyLob(ValueLob old, int tableId)` Copy a lob.
`ValueBlob` `createBlob(java.io.InputStream in, long maxLength)` Create a BLOB object.
`ValueClob` `createClob(java.io.Reader reader, long maxLength)` Create a CLOB object.
`java.io.InputStream` `getInputStream(long lobId, int tableId, long byteCount)` Get the input stream for the given lob
`java.io.InputStream` `getInputStream(long lobId, long byteCount)` Get the input stream for the given lob, only called on server side of a TCP connection.
`boolean` `isReadOnly()` Whether the storage is read-only
`void` `removeAllForTable(int tableId)` Remove all LOBs for this table.
`void` `removeLob(ValueLob lob)` Delete a LOB (from the database, if it is stored there).

### Method Detail

#### createClob

    ValueClob 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

    ValueBlob 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

    ValueLob copyLob(ValueLob old,
                     int tableId)

Copy a lob.

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

#### getInputStream

    java.io.InputStream getInputStream(long lobId,
                                       long byteCount)
                                throws java.io.IOException

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

Parameters:
  `lobId` - the lob id
  `byteCount` - the number of bytes to read, or -1 if not known
Returns:
  the stream
Throws:
  `java.io.IOException` - on failure

#### getInputStream

    java.io.InputStream getInputStream(long lobId,
                                       int tableId,
                                       long byteCount)
                                throws java.io.IOException

Get the input stream for the given lob

Parameters:
  `lobId` - the lob id
  `tableId` - the able id
  `byteCount` - the number of bytes to read, or -1 if not known
Returns:
  the stream
Throws:
  `java.io.IOException` - on failure

#### removeLob

    void removeLob(ValueLob 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

#### isReadOnly

    boolean isReadOnly()

Whether the storage is read-only

Returns:
  true if yes