Interface OracleClob
-
- All Superinterfaces:
Clob
- All Known Subinterfaces:
OracleNClob
public interface OracleClob extends Clob
This interface extends the standard JDBC interfaceCloband defines methods for Oracle specific Clob .Generally any new code should avoid the direct use of the class
CLOB. For variable declarations use the interfaceClobor this interface as required. Instead of the static methodsCLOB.createTemporary(java.sql.Connection, boolean, int)andCLOB.empty_lob()please useConnection.createClob()andCLOB.getEmptyCLOB()respectively.- Since:
- 11.2.0.3
-
<section role="region">
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()Close a previously opened CLOB.booleanisEmptyLob()Return true if this is a empty lob.booleanisOpen()Check whether the CLOB is opened.booleanisSecureFile()Returnstrueif this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).booleanisTemporary()Return true if the lob locator points to a temporary clob.voidopen(LargeObjectAccessMode mode)Open a CLOB in the indicated mode.default Flow.Publisher<String>publisherOracle(long position)Returns aPublisherthat publishes the content of thisClobbeginning at the specified position.default Flow.Subscriber<String>subscriberOracle(long position)Returns aSubscriberthat will append the published characters to thisClobbeginning at the specified position.default Flow.Subscriber<String>subscriberOracle(long position, Flow.Subscriber<Long> outcomeSubscriber)Returns aSubscriberthat will append the published characters to thisClobbeginning at the specified position.SQLXMLtoSQLXML()Returns an object which impements java.sql.SQLXML with content taken from this Clob.SQLXMLtoSQLXML(String schemaURL)Returns an object which impements java.sql.SQLXML with content taken from this Clob.-
Methods inherited from interface java.sql.Clob
free, getAsciiStream, getCharacterStream, getCharacterStream, getSubString, length, position, position, setAsciiStream, setCharacterStream, setString, setString, truncate
-
-
-
<section role="region">
-
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
-
close
void close() throws SQLExceptionClose a previously opened CLOB.- Throws:
SQLException- Since:
- 8.2.0
-
isOpen
boolean isOpen() throws SQLExceptionCheck whether the CLOB is opened.- Returns:
- true if the LOB is opened.
- Throws:
SQLException- Since:
- 8.2.0
-
isTemporary
boolean isTemporary() throws SQLExceptionReturn 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 SQLExceptionReturn 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 SQLExceptionReturnstrueif this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).- Returns:
trueif this is a SecureFile andfalseotherwise.- 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 aPublisherthat publishes the content of thisClobbeginning at the specified position. The argument to each call toSubscriber.onNextwill contain an implementation defined number of characters.Calling any method of this
ClobexceptisEmptyLob(),isSecureFile(),isTemporary(), or one defined byObjectbetween 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, receivedSubscriber.onError, or cancelled their subscription.- Parameters:
position- the position at which to start writing to the CLOB value that thisClobobject represents; The first position is 1- Returns:
- a
Publisherof the content of thisClob - Throws:
SQLException- if a database error occurs, or if this method is called on aClobthat has been freed, or ifpositionis less than 1- Since:
- 20
-
subscriberOracle
default Flow.Subscriber<String> subscriberOracle(long position) throws SQLException
Returns aSubscriberthat will append the published characters to thisClobbeginning at the specified position.Calling any method of this
ClobexceptisEmptyLob(),isSecureFile(),isTemporary(), or one defined byObjectbetween the time this method is called and the time when the returnedSubscriberterminates will block.The returned
Subscriberterminates onceSubscriber.onCompleteis received,Subscriber.onErroris received, or its subscription is cancelled.- Parameters:
position- the position at which to start writing to the CLOB value that thisClobobject represents; The first position is 1- Returns:
- a
Subscriberthat appends characters to thisClob - Throws:
SQLException- if a database error occurs, or if this method is called on aClobthat has been freed, or ifpositionis less than 1
-
subscriberOracle
default Flow.Subscriber<String> subscriberOracle(long position, Flow.Subscriber<Long> outcomeSubscriber) throws SQLException
Returns aSubscriberthat will append the published characters to thisClobbeginning at the specified position.Calling any method of this
ClobexceptisEmptyLob(),isSecureFile(),isTemporary(), or one defined byObjectbetween the time this method is called and the time when the returnedSubscriberterminates will block.The returned
Subscriberterminates onceSubscriber.onCompleteis received,Subscriber.onErroris 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
outcomeSubscriberreceives anonNextsignal each time a write to the CLOB value is successful. The number of characters transferred by each successful write is delivered with each invocation ofonNext. - The
outcomeSubscriberreceives anonCompletesignal after the last published character has been written successfully. - The
outcomeSubscriberreceives anonErrorsignal with aSQLExceptionif a failure occurs when writing published characters.
outcomeSubscribermust signal demand in order to receive any of the signals listed above. If more thanFlow.defaultBufferSize()writes have succeeded without demand from theoutcomeSubscriber, then the returned subscriber will not signal further demand until theoutcomeSubscriberhas 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.- Parameters:
position- the position at which to start writing to the CLOB value that thisClobobject represents; The first position is 1outcomeSubscriber- aSubscriberof write outcomes.- Returns:
- a
Subscriberthat appends characters to thisClob - Throws:
SQLException- if a database error occurs, or if this method is called on aClobthat has been freed, or ifpositionis less than 1NullPointerException- if theoutcomeSubscriberargument is null.- Since:
- 20
- The
-
-