Module org.firebirdsql.jaybird
Package org.firebirdsql.jdbc.field

# Class FBCachedClob

java.lang.Object
org.firebirdsql.jdbc.field.FBCachedClob

All Implemented Interfaces:
  `Clob`, `NClob`

public final class FBCachedClob extends Object implements Clob, NClob
Clob implementation that is cached client-side.

This implementation is used for disconnected result sets (ie scrollable and hold cursors over commit).

This class also implements `NClob` so it can be used with the `set/get/updateNClob` methods transparently. It technically does not conform to the JDBC requirements for `NClob`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FBCachedClob(FBCachedBlob blob, FBBlob.Config blobConfig)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `free()`
  `InputStream`
  `getAsciiStream()`
  `Reader`
  `getCharacterStream()`
  `Reader`
  `getCharacterStream(long pos, long length)`
  `String`
  `getSubString(long pos, int length)`
  `long`
  `length()`
  `long`
  `position(String searchstr, long start)`
  `long`
  `position(Clob searchstr, long start)`
  `OutputStream`
  `setAsciiStream(long pos)`
  `Writer`
  `setCharacterStream(long pos)`
  `int`
  `setString(long pos, String str)`
  `int`
  `setString(long pos, String str, int offset, int len)`
  `void`
  `truncate(long len)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FBCachedClob

    public FBCachedClob(FBCachedBlob blob, FBBlob.Config blobConfig)

- ## Method Details

  - ### free

    public void free() throws SQLException
    Specified by:
      `free` in interface `Clob`
    Throws:
      `SQLException`

  - ### getAsciiStream

    public InputStream getAsciiStream() throws SQLException
    Specified by:
      `getAsciiStream` in interface `Clob`
    Throws:
      `SQLException`

  - ### getCharacterStream

    public Reader getCharacterStream() throws SQLException
    Specified by:
      `getCharacterStream` in interface `Clob`
    Throws:
      `SQLException`

  - ### getCharacterStream

    public Reader getCharacterStream(long pos, long length) throws SQLException
    Specified by:
      `getCharacterStream` in interface `Clob`
    Throws:
      `SQLException`

  - ### getSubString

    public String getSubString(long pos, int length) throws SQLException
    Specified by:
      `getSubString` in interface `Clob`
    Throws:
      `SQLException`

  - ### length

    public long length() throws SQLException
    Specified by:
      `length` in interface `Clob`
    Throws:
      `SQLException`

  - ### position

    public long position(String searchstr, long start) throws SQLException
    Specified by:
      `position` in interface `Clob`
    Throws:
      `SQLException`

  - ### position

    public long position(Clob searchstr, long start) throws SQLException
    Specified by:
      `position` in interface `Clob`
    Throws:
      `SQLException`

  - ### setAsciiStream

    public OutputStream setAsciiStream(long pos) throws SQLException
    Specified by:
      `setAsciiStream` in interface `Clob`
    Throws:
      `SQLException`

  - ### setCharacterStream

    public Writer setCharacterStream(long pos) throws SQLException
    Specified by:
      `setCharacterStream` in interface `Clob`
    Throws:
      `SQLException`

  - ### setString

    public int setString(long pos, String str) throws SQLException
    Specified by:
      `setString` in interface `Clob`
    Throws:
      `SQLException`

  - ### setString

    public int setString(long pos, String str, int offset, int len) throws SQLException
    Specified by:
      `setString` in interface `Clob`
    Throws:
      `SQLException`

  - ### truncate

    public void truncate(long len) throws SQLException
    Specified by:
      `truncate` in interface `Clob`
    Throws:
      `SQLException`