Package oracle.sql

Class CLOB

All Implemented Interfaces:
Serializable, Clob, oracle.jdbc.internal.ACProxyable, oracle.jdbc.internal.OracleClob, oracle.jdbc.internal.OracleConcreteProxy, oracle.jdbc.internal.OracleDatumWithConnection, oracle.jdbc.internal.OracleLargeObject<char[]>, OracleClob
Direct Known Subclasses:
NCLOB

public class CLOB extends DatumWithConnection implements oracle.jdbc.internal.OracleClob, oracle.jdbc.internal.OracleConcreteProxy
Deprecated.
Use java.sql.Clob interface for declaration instead of using concrete class oracle.sql.CLOB.
This class implements java.sql.Clob interface in JDBC.2.0. Use java.sql.Clob interface for declaration instead of using concrete class oracle.sql.CLOB. java.sql.Clob has methods declared for all opertions. For Oracle specific methods use the interface oracle.jdbc.OracleClob. There is no need for the user to bother about chunk sizes any more it is taken care of internally.

Obtaining java.sql.Clob from ResultSet

java.sql.Clob clob = resultSet.getClob(...);

Creating a temporary Clob should use Connection.createClob()

java.sql.Clob clob = connection.createClob();
See Also:
  • Field Details

    • MAX_CHUNK_SIZE

      public static final int MAX_CHUNK_SIZE
      Deprecated.
      See Also:
    • DURATION_INVALID

      public static final int DURATION_INVALID
      Deprecated.
      See Also:
    • DURATION_SESSION

      public static final int DURATION_SESSION
      Deprecated.
      See Also:
    • DURATION_CALL

      public static final int DURATION_CALL
      Deprecated.
      See Also:
    • OLD_WRONG_DURATION_SESSION

      public static final int OLD_WRONG_DURATION_SESSION
      Deprecated.
      See Also:
    • OLD_WRONG_DURATION_CALL

      public static final int OLD_WRONG_DURATION_CALL
      Deprecated.
      See Also:
    • MODE_READONLY

      public static final int MODE_READONLY
      Deprecated.
      See Also:
    • MODE_READWRITE

      public static final int MODE_READWRITE
      Deprecated.
      See Also:
    • target

      protected oracle.jdbc.driver.OracleClob target
      Deprecated.
  • Constructor Details

  • Method Details

    • getTarget

      public oracle.jdbc.driver.OracleClob getTarget()
      Deprecated.
    • getFormOfUseFromLocator

      public static final short getFormOfUseFromLocator(byte[] lob_descriptor)
      Deprecated.
    • isNCLOB

      public boolean isNCLOB()
      Deprecated.
      Specified by:
      isNCLOB in interface oracle.jdbc.internal.OracleClob
      Returns:
      true if the data is bound for a SQL NCHAR datatype false otherwise
    • length

      public long length() throws SQLException
      Deprecated.
      Implements the Clob interface method. Returns the number of characters in the CLOB value designated by this Clob object.
      Specified by:
      length in interface Clob
      Returns:
      length of the CLOB in characters
      Throws:
      SQLException - if there is an error accessing the length of the CLOB
    • publisherOracle

      public final Flow.Publisher<String> publisherOracle(long position, ErrorSet continueOnErrorSet) throws SQLException
      Deprecated.
      Description copied from interface: OracleClob
      Returns a Publisher that publishes the content of this Clob beginning at the specified position. The argument to each call to Subscriber.onNext will contain an implementation defined number of characters.

      Calling any method of this Clob except isEmptyLob(), isSecureFile(), isTemporary(), or one defined by Object between the time this method is called and the time when the returned publisher terminates will block.

      The returned publisher terminates once all subscribers have received Subscriber.onComplete, received Subscriber.onError, or cancelled their subscription.

      Upon signalling demand to the returned Publisher, LOB read operations will enter into the execution pipeline of this LOB's connection. If an operation fails with an error not in the continueOnErrorSet, the pipeline will abort all subsequent asynchronous operations, up to the next OracleCommonConnection.resume().

      Specified by:
      publisherOracle in interface OracleClob
      Parameters:
      position - the position at which to start writing to the CLOB value that this Clob object represents; The first position is 1
      continueOnErrorSet - Set of errors which do not cause subsequent operations to be aborted. Not null.
      Returns:
      a Publisher of the content of this Clob
      Throws:
      SQLException - if a database error occurs, or if this method is called on a Clob that has been freed, or if position is less than 1
    • subscriberOracle

      public final Flow.Subscriber<String> subscriberOracle(long position, ErrorSet continueOnErrorSet) throws SQLException
      Deprecated.
      Description copied from interface: OracleClob
      Returns a Subscriber that will append the published characters to this Clob beginning at the specified position.

      Calling any method of this Clob except isEmptyLob(), isSecureFile(), isTemporary(), or one defined by Object between the time this method is called and the time when the returned Subscriber terminates will block.

      The returned Subscriber terminates once Subscriber.onComplete is received, Subscriber.onError is received, or its subscription is cancelled.

      Upon receiving characters from an upstream Publisher, LOB write operations will enter into the execution pipeline of this LOB's connection. If an operation fails with an error not in the continueOnErrorSet, the pipeline will abort all subsequent asynchronous operations, up to the next OracleCommonConnection.resume().

      Specified by:
      subscriberOracle in interface OracleClob
      Parameters:
      position - the position at which to start writing to the CLOB value that this Clob object represents; The first position is 1
      continueOnErrorSet - Set of errors which do not cause subsequent operations to be aborted. Not null.
      Returns:
      a Subscriber that appends characters to this Clob
      Throws:
      SQLException - if a database error occurs, or if this method is called on a Clob that has been freed, or if position is less than 1
    • subscriberOracle

      public final Flow.Subscriber<String> subscriberOracle(long position, Flow.Subscriber<Long> outcomeSubscriber, ErrorSet continueOnErrorSet) throws SQLException
      Deprecated.
      Description copied from interface: OracleClob
      Returns a Subscriber that will append the published characters to this Clob beginning at the specified position.

      Calling any method of this Clob except isEmptyLob(), isSecureFile(), isTemporary(), or one defined by Object between the time this method is called and the time when the returned Subscriber terminates will block.

      The returned Subscriber terminates once Subscriber.onComplete is received, Subscriber.onError is received, or its subscription is cancelled.

      The outcome of writing published characters to the CLOB value that this Clob object represents is published to the outcomeSubscriber:

      • The outcomeSubscriber receives an onNext signal each time a write to the CLOB value is successful. The number of characters transferred by each successful write is delivered with each invocation of onNext.
      • The outcomeSubscriber receives an onComplete signal after the last published character has been written successfully.
      • The outcomeSubscriber receives an onError signal with a SQLException if a failure occurs when writing published characters.
      The outcomeSubscriber must signal demand in order to receive any of the signals listed above. If more than Flow.defaultBufferSize() writes have succeeded without demand from the outcomeSubscriber, then the returned subscriber will not signal further demand until the outcomeSubscriber has also signalled demand.

      The number of writes used to transfer published characters to the CLOB value is implementation defined, and may be different from the number of Strings published to the returned Subscriber.

      Upon receiving characters from an upstream Publisher, LOB write operations will enter into the execution pipeline of this LOB's connection. If an operation fails with an error not in the continueOnErrorSet, the pipeline will abort all subsequent asynchronous operations, up to the next OracleCommonConnection.resume().

      Specified by:
      subscriberOracle in interface OracleClob
      Parameters:
      position - the position at which to start writing to the CLOB value that this Clob object represents; The first position is 1
      outcomeSubscriber - a Subscriber of write outcomes.
      continueOnErrorSet - Set of errors which do not cause subsequent operations to be aborted. Not null.
      Returns:
      a Subscriber that appends characters to this Clob
      Throws:
      SQLException - if a database error occurs, or if this method is called on a Clob that has been freed, or if position is less than 1
    • freeAsyncOracle

      public final Flow.Publisher<Void> freeAsyncOracle() throws SQLException
      Deprecated.
      Returns a Publisher that publishes the result of freeing the Clob object and the resources that it holds. The object is invalid after the returned Publisher terminates with onComplete.

      After the returned Publisher terminates with onComplete, any attempt to invoke a method other than Clob.free() or freeAsyncOracle will result in an SQLException being thrown. Calling freeAsyncOracle on a Clob object that has already been freed is treated as a no-op.

      Calling any method of this Clob except isEmptyLob(), isSecureFile(), isTemporary(), or one defined by Object between the time this method is called and the time when the returned Subscriber terminates will block.

      The returned publisher terminates once all subscribers have received Subscriber.onComplete, received Subscriber.onError, or cancelled their subscription.

      The returned publisher will only emit onComplete or onError; No items are emitted to onNext.

      Implements the Reactive Extensions API by delegating to the ojiOracleClob's implemenation.

      Specified by:
      freeAsyncOracle in interface OracleClob
      Returns:
      a Publisher of the result of freeing this Clob
      Throws:
      SQLException - if a database error occurs
    • getSubString

      public String getSubString(long pos, int length) throws SQLException
      Deprecated.
      Implements the Clob interface method. Returns a copy of the specified substring in the CLOB value designated by this Clob object. The substring begins at position pos and has up to length consecutive characters.
      Specified by:
      getSubString in interface Clob
      Parameters:
      pos - the first character of the substring to be extracted. The first character is at position 1.
      length - the number of consecutive characters to be copied
      Returns:
      a String that is the specified substring in the CLOB value designated by this Clob object. If the pos argument is larger than the length of the data the result is an empty String. If the pos argument is less than the length of the data, but the sum of pos argument and the length is greater than the length of the data, the result will be smaller than the length requested.
      Throws:
      SQLException - if there is an error accessing the CLOB
    • getCharacterStream

      public Reader getCharacterStream() throws SQLException
      Deprecated.
      Implements the Clob interface method. Gets the Clob contents as a Unicode stream.
      Specified by:
      getCharacterStream in interface Clob
      Returns:
      a Unicode stream containing the CLOB data
      Throws:
      SQLException - if there is an error accessing the CLOB
    • getAsciiStream

      public InputStream getAsciiStream() throws SQLException
      Deprecated.
      Implements the Clob interface method. Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.
      Specified by:
      getAsciiStream in interface Clob
      Returns:
      an ascii stream containing the CLOB data
      Throws:
      SQLException - if there is an error accessing the CLOB value
    • getAsciiStream

      public InputStream getAsciiStream(boolean isInternal) throws SQLException
      Deprecated.
      Implements the Clob interface method. Gets the CLOB value designated by this Clob object as a stream of Ascii bytes.
      Returns:
      an ascii stream containing the CLOB data
      Throws:
      SQLException - if there is an error accessing the CLOB value
    • position

      public long position(String searchstr, long start) throws SQLException
      Deprecated.
      Implements the Clob interface method. Determine the character position at which the given substring
      Specified by:
      position in interface Clob
      Parameters:
      searchstr - is the substring to search for.
      start - is the position at which to begin searching.
      Returns:
      the position at which the substring appears, else -1.
      Throws:
      SQLException
    • position

      public long position(Clob searchstr, long start) throws SQLException
      Deprecated.
      Implements the Clob interface method. Determine the character position at which the given substring
      Specified by:
      position in interface Clob
      Parameters:
      searchstr - is the substring to search for.
      start - is the position at which to begin searching.
      Returns:
      the position at which the substring appears, else -1.
      Throws:
      SQLException
    • getChars

      public int getChars(long pos, int length, char[] buffer) throws SQLException
      Deprecated.
      Oracle extension. Return copy of the substring of the CLOB at the requested position.
      Specified by:
      getChars in interface oracle.jdbc.internal.OracleClob
      Parameters:
      buffer - is the buffer into whcih the characters are read.
      pos - is the first character of the substring to be extracted.
      length - is the number of consecutive character to be copied.
      Returns:
      the actual number of characters read.
      Throws:
      SQLException
    • getCharacterOutputStream

      public Writer getCharacterOutputStream() throws SQLException
      Deprecated.
      This method is deprecated. Use setCharacterStream( 1L ).
      Oracle extension. Write Unicode stream to the CLOB.
      Specified by:
      getCharacterOutputStream in interface oracle.jdbc.internal.OracleClob
      Returns:
      a Unicode character output stream.
      Throws:
      SQLException
    • getAsciiOutputStream

      public OutputStream getAsciiOutputStream() throws SQLException
      Deprecated.
      This method is deprecated. Use setAsciiStream( 1L );
      Oracle extension. Write ascii stream to the CLOB.
      Specified by:
      getAsciiOutputStream in interface oracle.jdbc.internal.OracleClob
      Returns:
      a ascii output stream.
      Throws:
      SQLException
    • putChars

      public int putChars(long pos, char[] chars) throws SQLException
      Deprecated.
      Oracle extension. Write characters at the requested position.
      Specified by:
      putChars in interface oracle.jdbc.internal.OracleClob
      Parameters:
      pos - is the position to write characters.
      chars - is the buffer of characters to be written.
      Returns:
      the actual number of characters written.
      Throws:
      SQLException
    • putChars

      public int putChars(long pos, char[] chars, int length) throws SQLException
      Deprecated.
      Oracle extension. Write characters at the requested position.
      Parameters:
      pos - is the position to write characters.
      chars - is the buffer of characters to be written.
      length - is the length to write
      Returns:
      the actual number of characters written.
      Throws:
      SQLException
    • putChars

      public int putChars(long pos, char[] chars, int offset, int length) throws SQLException
      Deprecated.
      Oracle extension. Write characters at the requested position.
      Specified by:
      putChars in interface oracle.jdbc.internal.OracleClob
      Parameters:
      pos - is the position to write characters.
      chars - is the buffer of characters to be written.
      offset - is the position in the buffer from which to begin
      length - is the length to write
      Returns:
      the actual number of characters written.
      Throws:
      SQLException
    • putString

      public int putString(long pos, String str) throws SQLException
      Deprecated.
      This method is deprecated -- use setString.
      Oracle extension. Write String to a CLOB This method provides support to return a 32-bit specification of the number of characters written to the CLOB.
      Specified by:
      putString in interface oracle.jdbc.internal.OracleClob
      Throws:
      SQLException
    • getChunkSize

      public int getChunkSize() throws SQLException
      Deprecated.
      Oracle extension. Get database LOB storage chunk size. There is no need for the user to use this, since the driver does the read and writes in chunk sizes internally.
      Specified by:
      getChunkSize in interface oracle.jdbc.internal.OracleClob
      Returns:
      the size in terms of characters.
      Throws:
      SQLException
    • getBufferSize

      public int getBufferSize() throws SQLException
      Deprecated.
      Oracle extension. Get ideal LOB db access buffer size.
      Specified by:
      getBufferSize in interface oracle.jdbc.internal.OracleClob
      Returns:
      the size in terms of characters.
      Throws:
      SQLException
    • empty_lob

      public static CLOB empty_lob() throws SQLException
      Deprecated.
      use getEmptyCLOB instead
      Return a empty lob. An empty lob is used initialize a LOB column/attribute. Note: an empty lob can not be read or written
      Returns:
      a empty lob
      Throws:
      SQLException
      Since:
      8.1.7
    • getEmptyCLOB

      public static CLOB getEmptyCLOB() throws SQLException
      Deprecated.
      Return a empty lob. An empty lob is used initialize a LOB column/attribute. Note: an empty lob can not be read or written
      Returns:
      a empty lob
      Throws:
      SQLException
      Since:
      10.2
    • isEmptyLob

      public boolean isEmptyLob() throws SQLException
      Deprecated.
      Return true if this is a empty lob.
      Specified by:
      isEmptyLob in interface OracleClob
      Returns:
      true if this is a empty lob. This method supports only Clobs that are not returned from the database. For Clobs returned from the database, use length(), i.e. check for zero length
      Throws:
      SQLException
      Since:
      8.1.7
      See Also:
    • isSecureFile

      public boolean isSecureFile() throws SQLException
      Deprecated.
      Returns true if this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).
      Specified by:
      isSecureFile in interface OracleClob
      Returns:
      true if this is a SecureFile and false otherwise.
      Throws:
      SQLException
    • getAsciiOutputStream

      public OutputStream getAsciiOutputStream(long pos) throws SQLException
      Deprecated.
      This method is deprecated. Use setAsciiStream.
      Write to the CLOB from a stream at the requested position.
      Specified by:
      getAsciiOutputStream in interface oracle.jdbc.internal.OracleClob
      Parameters:
      pos - is the position data to be put.
      Returns:
      a output stream to write data to the CLOB
      Throws:
      SQLException
      Since:
      8.2.0
    • getCharacterOutputStream

      public Writer getCharacterOutputStream(long pos) throws SQLException
      Deprecated.
      This method is deprecated. Use setCharacterStream.
      Write to the CLOB from a stream at the requested position.
      Specified by:
      getCharacterOutputStream in interface oracle.jdbc.internal.OracleClob
      Parameters:
      pos - is the position data to be put.
      Returns:
      a output stream to write data to the CLOB
      Throws:
      SQLException
      Since:
      8.2.0
    • getAsciiStream

      public InputStream getAsciiStream(long pos) throws SQLException
      Deprecated.
      Read from the CLOB as a stream at the requested position.
      Specified by:
      getAsciiStream in interface oracle.jdbc.internal.OracleClob
      Parameters:
      pos - is the position data to be put.
      Returns:
      a input stream to read data from the CLOB
      Throws:
      SQLException
      Since:
      8.2.0
    • getCharacterStream

      public Reader getCharacterStream(long pos) throws SQLException
      Deprecated.
      Read from the CLOB as a stream at the requested position.
      Specified by:
      getCharacterStream in interface oracle.jdbc.internal.OracleClob
      Parameters:
      pos - is the position data to be put.
      Returns:
      a input stream to read data from the CLOB
      Throws:
      SQLException
      Since:
      8.2.0
    • trim

      public void trim(long newlen) throws SQLException
      Deprecated.
      This method is deprecated. Use truncate().
      Trim the value of the CLOB to the length you specify in the newlen parameter.
      Specified by:
      trim in interface oracle.jdbc.internal.OracleClob
      Parameters:
      newlen - the new length of the CLOB.
      Throws:
      SQLException
      Since:
      8.2.0
    • createTemporary

      public static CLOB createTemporary(Connection conn, boolean cache, int _duration) throws SQLException
      Deprecated.
      Create a temporary clob.
      Parameters:
      cache - Specifies if LOB should be read into buffer cache or not.
      _duration - The duration of the temporary LOB. The following are valid values: DURATION_SESSION, DURATION_CALL.
      Returns:
      A temporary clob.
      Throws:
      SQLException
      Since:
      8.2.0
    • createTemporary

      public static CLOB createTemporary(Connection conn, boolean cache, int _duration, short form_of_use) throws SQLException
      Deprecated.
      Create a temporary clob or nclob.
      Parameters:
      cache - Specifies if LOB should be read into buffer cache or not.
      _duration - The duration of the temporary LOB. The following are valid values: DURATION_SESSION, DURATION_CALL.
      form_of_use - Valid values are FORM_CHAR and FORM_NCHAR
      Returns:
      A temporary clob.
      Throws:
      SQLException
      Since:
      10g
    • freeTemporary

      public static void freeTemporary(CLOB temp_lob) throws SQLException
      Deprecated.
      Free the contents and the locator of the temporary clob.
      Parameters:
      temp_lob - A temporary clob to be freeed.
      Throws:
      SQLException - if temp_lob is a permanent lob or temp_lob has already been freed.
      Since:
      8.2.0
    • isTemporary

      public static boolean isTemporary(CLOB lob) throws SQLException
      Deprecated.
      Return true if the lob locator points to a temporary clob. False if it does not.
      Parameters:
      lob - the clob to test.
      Returns:
      true if the lob locator points to a temporary clob. False if it does not.
      Throws:
      SQLException
      Since:
      8.2.0
    • getDuration

      public static short getDuration(CLOB lob) throws SQLException
      Deprecated.
      return the duration of a temporary LOB
      Returns:
      the duration of a temporary LOB
      Throws:
      SQLException
      Since:
      18.1
    • freeTemporary

      public void freeTemporary() throws SQLException
      Deprecated.
      Free the contents and the locator of the temporary clob.
      Specified by:
      freeTemporary in interface oracle.jdbc.internal.OracleLargeObject<char[]>
      Throws:
      SQLException - if self is a permanent lob or self has already been freed.
      Since:
      8.2.0
    • isTemporary

      public boolean isTemporary() throws SQLException
      Deprecated.
      Return true if the lob locator points to a temporary clob. False if it does not.
      Specified by:
      isTemporary in interface OracleClob
      Specified by:
      isTemporary in interface oracle.jdbc.internal.OracleLargeObject<char[]>
      Returns:
      true if the lob locator points to a temporary clob. False if it does not.
      Throws:
      SQLException
      Since:
      8.2.0
    • getDuration

      public short getDuration() throws SQLException
      Deprecated.
      return the duration of a temporary LOB
      Specified by:
      getDuration in interface oracle.jdbc.internal.OracleLargeObject<char[]>
      Returns:
      the duration of a temporary LOB
      Throws:
      SQLException
      Since:
      18.1
    • openLob

      public void openLob(LargeObjectAccessMode mode) throws SQLException
      Deprecated.
      Public method using enum instead of int
      Specified by:
      openLob in interface OracleClob
      Throws:
      SQLException
    • open

      @Deprecated(since="23.5", forRemoval=true) public void open(int mode) throws SQLException
      Deprecated, for removal: This API element is subject to removal in a future version.
      The name of this method is anticipated to conflict with a future version of the JDBC Specification. This method will be removed in a future version of the Oracle JDBC Driver. Any calls to this method should be replaced with a call to openLob(int), which provides the exact same behavior.
      Open a CLOB in the indicated mode. Valid modes include MODE_READONLY, and MODE_READWRITE. It is an error to open the same LOB twice.
      Throws:
      SQLException
      Since:
      8.2.0
    • closeLob

      public void closeLob() throws SQLException
      Deprecated.
      Close a previously opened CLOB.
      Specified by:
      closeLob in interface OracleClob
      Throws:
      SQLException
      Since:
      23.5
    • isOpenLob

      public boolean isOpenLob() throws SQLException
      Deprecated.
      Check whether the CLOB is opened.
      Specified by:
      isOpenLob in interface OracleClob
      Returns:
      true if the LOB is opened.
      Throws:
      SQLException
      Since:
      23.5
    • setString

      public int setString(long pos, String str) throws SQLException
      Deprecated.
      JDBC 3.0 Writes the given Java String to the CLOB value that this Clob object designates at the position pos.
      Specified by:
      setString in interface Clob
      Parameters:
      pos - the position at which to start writing to the CLOB value that this Clob object represents
      str - the string to be written to the CLOB value that this Clob designates
      Returns:
      the number of characters written
      Throws:
      SQLException - if there is an error accessing the CLOB value
      Since:
      9.0.2
    • setString

      public int setString(long pos, String str, int offset, int len) throws SQLException
      Deprecated.
      JDBC 3.0 Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
      Specified by:
      setString in interface Clob
      Parameters:
      pos - the position at which to start writing to this CLOB object
      str - the string to be written to the CLOB value that this Clob object represents
      offset - the offset into str to start reading the characters to be written
      len - the number of characters to be written
      Returns:
      the number of characters written
      Throws:
      SQLException - if there is an error accessing the CLOB value
      Since:
      9.0.2 This method is currently not supported. Use setString( long pos, String str )
    • setAsciiStream

      public OutputStream setAsciiStream(long pos) throws SQLException
      Deprecated.
      JDBC 3.0 Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.
      Specified by:
      setAsciiStream in interface Clob
      Parameters:
      pos - the position at which to start writing to this CLOB object
      Returns:
      the stream to which ASCII encoded characters can be written
      Throws:
      SQLException - if there is an error accessing the CLOB value
      Since:
      9.0.2
    • setCharacterStream

      public Writer setCharacterStream(long pos) throws SQLException
      Deprecated.
      JDBC 3.0 Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this Clob object represents, at position pos.
      Specified by:
      setCharacterStream in interface Clob
      Parameters:
      pos - the position at which to start writing to the CLOB value
      Returns:
      a stream to which Unicode encoded characters can be written
      Throws:
      SQLException - if there is an error accessing the CLOB value
      Since:
      9.0.2
    • truncate

      public void truncate(long len) throws SQLException
      Deprecated.
      JDBC 3.0 Truncates the CLOB value that this Clob designates to have a length of len characters.
      Specified by:
      truncate in interface Clob
      Parameters:
      len - the length, in bytes, to which the CLOB value should be truncated
      Throws:
      SQLException - if there is an error accessing the CLOB value
      Since:
      9.0.2
    • toJdbc

      public Object toJdbc() throws SQLException
      Deprecated.
      Convert this data object into its default Java object type.
      Specified by:
      toJdbc in interface oracle.jdbc.internal.OracleClob
      Specified by:
      toJdbc in interface oracle.jdbc.internal.OracleDatumWithConnection
      Specified by:
      toJdbc in class Datum
      Returns:
      this object.
      Throws:
      SQLException - if any of the lower layer code throws an exception.
    • isConvertibleTo

      public boolean isConvertibleTo(Class<?> jClass)
      Deprecated.
      Test whether this data object can be converted to the specified Java data type.
      Specified by:
      isConvertibleTo in interface oracle.jdbc.internal.OracleClob
      Specified by:
      isConvertibleTo in interface oracle.jdbc.internal.OracleDatumWithConnection
      Specified by:
      isConvertibleTo in class Datum
      Parameters:
      jClass - specifies the Java data type to test against.
      Returns:
      true if this data object is convertible to the specified Java class, and a corresponding xxxValue() method is available; otherwise, a false is returned.
    • stringValue

      public String stringValue() throws SQLException
      Deprecated.
      Convert to a String representation of the datum object
      Specified by:
      stringValue in interface oracle.jdbc.internal.OracleClob
      Specified by:
      stringValue in interface oracle.jdbc.internal.OracleDatumWithConnection
      Overrides:
      stringValue in class Datum
      Returns:
      String representation of the datum object
      Throws:
      SQLException
    • getJavaSqlConnection

      public Connection getJavaSqlConnection() throws SQLException
      Deprecated.
      Description copied from class: DatumWithConnection
      Oracle extension Return the java.sql.Connection associated with the receiver. Since 9.0.0 not all Oracle JDBC connection objects are assignment compatible with oracle.jdbc.driver.OracleConnection. If the connection is wrapped, return the outermost wrapper.
      Specified by:
      getJavaSqlConnection in interface oracle.jdbc.internal.OracleClob
      Specified by:
      getJavaSqlConnection in interface oracle.jdbc.internal.OracleDatumWithConnection
      Overrides:
      getJavaSqlConnection in class DatumWithConnection
      Returns:
      the connection
      Throws:
      SQLException - if an error occurs
    • setPrefetchData

      public final void setPrefetchData(oracle.jdbc.internal.OracleLargeObject.PrefetchData<char[]> prefetchData)
      Deprecated.
      Specified by:
      setPrefetchData in interface oracle.jdbc.internal.OracleLargeObject<char[]>
    • getPrefetchData

      public final oracle.jdbc.internal.OracleLargeObject.PrefetchData<char[]> getPrefetchData()
      Deprecated.
      Specified by:
      getPrefetchData in interface oracle.jdbc.internal.OracleLargeObject<char[]>
    • getPrefetchedDataSize

      public final int getPrefetchedDataSize()
      Deprecated.
    • canReadBasicLobDataInLocator

      public boolean canReadBasicLobDataInLocator() throws SQLException
      Deprecated.
      Can the lob data be read directly from the locator?
      Specified by:
      canReadBasicLobDataInLocator in interface oracle.jdbc.internal.OracleClob
      Returns:
      True if we can; false otherwise.
      Throws:
      SQLException
    • freeLOB

      public void freeLOB() throws SQLException
      Deprecated.
      Specified by:
      freeLOB in interface oracle.jdbc.internal.OracleLargeObject<char[]>
      Throws:
      SQLException
    • free

      public void free() throws SQLException
      Deprecated.
      Free the resources the clob holds.
      Specified by:
      free in interface Clob
      Throws:
      SQLException
      Since:
      11.0
    • getCharacterStream

      public Reader getCharacterStream(long pos, long length) throws SQLException
      Deprecated.
      Return a character stream beginning at the specified position and ofthe specified length.
      Specified by:
      getCharacterStream in interface Clob
      Parameters:
      pos - start position
      length - number of characters in the result
      Throws:
      SQLException - - if pos is less than 1 or if pos is greater than the number of characters in the Clob or if pos + length is greater than the number of characters in the Clob or if an error occurs
      Since:
      11.0
    • setBytes

      public void setBytes(byte[] locator)
      Deprecated.
      Description copied from class: Datum
      Sets datum value using a byte array. The byte array is copied.
      Specified by:
      setBytes in interface oracle.jdbc.internal.OracleDatumWithConnection
      Overrides:
      setBytes in class Datum
      Parameters:
      locator - byte array used to set the datum value
    • toSQLXML

      public SQLXML toSQLXML() throws SQLException
      Deprecated.
      Returns an object which impements java.sql.SQLXML with content take from this Clob.
      Specified by:
      toSQLXML in interface OracleClob
      Returns:
      the new SQLXML object
      Throws:
      SQLException
      Since:
      12.2
    • toSQLXML

      public SQLXML toSQLXML(String schemaURL) throws SQLException
      Deprecated.
      Returns an object which impements java.sql.SQLXML with content taken from this Clob.
      Specified by:
      toSQLXML in interface OracleClob
      Returns:
      the new SQLXML object
      Throws:
      SQLException
      Since:
      12.2
    • isFree

      public final boolean isFree()
      Deprecated.
      Specified by:
      isFree in interface oracle.jdbc.internal.OracleLargeObject<char[]>