Package oracle.jdbc

Interface OracleClob

    • Method Detail

      • open

        void open​(LargeObjectAccessMode mode)
           throws SQLException
        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
      • isOpen

        boolean isOpen()
                throws SQLException
        Check whether the CLOB is opened.
        Returns:
        true if the LOB is opened.
        Throws:
        SQLException
        Since:
        8.2.0
      • isTemporary

        boolean isTemporary()
                     throws SQLException
        Return true if the lob locator points to a temporary clob. False if it does not.
        Returns:
        true if the lob locator points to a temporary clob. False if it does not.
        Throws:
        SQLException
        Since:
        8.2.0
      • isEmptyLob

        boolean isEmptyLob()
                    throws SQLException
        Return true if this is a empty lob.
        Returns:
        true if this is a empty lob.
        Throws:
        SQLException
        Since:
        8.1.7
        See Also:
        empty_lob
      • isSecureFile

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

        SQLXML toSQLXML()
                 throws SQLException
        Returns an object which impements java.sql.SQLXML with content taken from this Clob.
        Returns:
        the new SQLXML object
        Throws:
        SQLException
        Since:
        12.2
      • toSQLXML

        SQLXML toSQLXML​(String schemaURL)
                 throws SQLException
        Returns an object which impements java.sql.SQLXML with content taken from this Clob.
        Returns:
        the new SQLXML object
        Throws:
        SQLException
        Since:
        12.2
      • publisherOracle

        default Flow.Publisher<String> publisherOracle​(long position)
                                                throws SQLException
        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.

        Asynchronous tasks initiated by this method will execute under the current AccessControlContext of the calling thread.

        Parameters:
        position - the position at which to start writing to the CLOB value that this Clob object represents; The first position is 1
        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
        Since:
        20
      • subscriberOracle

        default Flow.Subscriber<String> subscriberOracle​(long position)
                                                  throws SQLException
        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.

        Asynchronous tasks initiated by this method will execute under the current AccessControlContext of the calling thread.

        Parameters:
        position - the position at which to start writing to the CLOB value that this Clob object represents; The first position is 1
        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

        default Flow.Subscriber<String> subscriberOracle​(long position,
                                                         Flow.Subscriber<Long> outcomeSubscriber)
                                                  throws SQLException
        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.

        Asynchronous tasks initiated by this method will execute under the current AccessControlContext of the calling thread.

        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.
        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
        NullPointerException - if the outcomeSubscriber argument is null.
        Since:
        20
      • freeAsyncOracle

        default Flow.Publisher<Void> freeAsyncOracle()
                                              throws SQLException
        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.

        Asynchronous tasks initiated by this method will execute under the current AccessControlContext of the calling thread.

        Returns:
        a Publisher of the result of freeing this Clob
        Throws:
        SQLException - if a database error occurs
        Since:
        21