Package org.h2.store

Interface LobStorageInterface

All Known Implementing Classes:
LobStorageFrontend, LobStorageMap

public interface LobStorageInterface
A mechanism to store and retrieve lob data.
  • Method Details

    • createClob

      ValueClob createClob(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(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

      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 - the lob id
      byteCount - the number of bytes to read, or -1 if not known
      Returns:
      the stream
      Throws:
      IOException - on failure
    • getInputStream

      InputStream getInputStream(long lobId, int tableId, long byteCount) throws 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:
      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