public class CLOB extends DatumWithConnection implements oracle.jdbc.internal.OracleClob, oracle.jdbc.internal.OracleConcreteProxy
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();
Clob,
OracleClob,
Connection.createClob(),
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
DURATION_CALL
Deprecated.
|
static int |
DURATION_INVALID
Deprecated.
|
static int |
DURATION_SESSION
Deprecated.
|
static int |
MAX_CHUNK_SIZE
Deprecated.
|
static int |
MODE_READONLY
Deprecated.
|
static int |
MODE_READWRITE
Deprecated.
|
static int |
OLD_WRONG_DURATION_CALL
Deprecated.
|
static int |
OLD_WRONG_DURATION_SESSION
Deprecated.
|
protected oracle.jdbc.driver.OracleClob |
target
Deprecated.
|
targetDatumWithConnectionojiOracleDatumWithConnection, targetDatum| Modifier | Constructor and Description |
|---|---|
protected |
CLOB()
Deprecated.
|
protected |
CLOB(oracle.jdbc.driver.OracleClob c)
Deprecated.
Call from empty lob static method
|
|
CLOB(OracleConnection conn,
byte[] lob_descriptor,
short csform)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canReadBasicLobDataInLocator()
Deprecated.
Can the lob data be read directly from the locator?
|
void |
closeLob()
Deprecated.
Close a previously opened CLOB.
|
static CLOB |
createTemporary(java.sql.Connection conn,
boolean cache,
int _duration)
Deprecated.
Create a temporary clob.
|
static CLOB |
createTemporary(java.sql.Connection conn,
boolean cache,
int _duration,
short form_of_use)
Deprecated.
Create a temporary clob or nclob.
|
static CLOB |
empty_lob()
Deprecated.
use getEmptyCLOB instead
|
void |
free()
Deprecated.
Free the resources the clob holds.
|
void |
freeLOB()
Deprecated.
|
void |
freeTemporary()
Deprecated.
Free the contents and the locator of the temporary clob.
|
static void |
freeTemporary(CLOB temp_lob)
Deprecated.
Free the contents and the locator of the temporary clob.
|
java.io.OutputStream |
getAsciiOutputStream()
Deprecated.
This method is deprecated. Use setAsciiStream( 1L );
|
java.io.OutputStream |
getAsciiOutputStream(long pos)
Deprecated.
This method is deprecated. Use setAsciiStream.
|
java.io.InputStream |
getAsciiStream()
Deprecated.
Implements the Clob interface method.
|
java.io.InputStream |
getAsciiStream(boolean isInternal)
Deprecated.
Implements the Clob interface method.
|
java.io.InputStream |
getAsciiStream(long pos)
Deprecated.
Read from the CLOB as a stream at the requested position.
|
int |
getBufferSize()
Deprecated.
Oracle extension.
|
java.io.Writer |
getCharacterOutputStream()
Deprecated.
This method is deprecated. Use setCharacterStream( 1L ).
|
java.io.Writer |
getCharacterOutputStream(long pos)
Deprecated.
This method is deprecated. Use setCharacterStream.
|
java.io.Reader |
getCharacterStream()
Deprecated.
Implements the Clob interface method.
|
java.io.Reader |
getCharacterStream(long pos)
Deprecated.
Read from the CLOB as a stream at the requested position.
|
java.io.Reader |
getCharacterStream(long pos,
long length)
Deprecated.
Return a character stream beginning at the specified position and ofthe specified
length.
|
int |
getChars(long pos,
int length,
char[] buffer)
Deprecated.
Oracle extension.
|
int |
getChunkSize()
Deprecated.
Oracle extension.
|
short |
getDuration()
Deprecated.
return the duration of a temporary LOB
|
static short |
getDuration(CLOB lob)
Deprecated.
return the duration of a temporary LOB
|
static CLOB |
getEmptyCLOB()
Deprecated.
Return a empty lob.
|
static short |
getFormOfUseFromLocator(byte[] lob_descriptor)
Deprecated.
|
java.sql.Connection |
getJavaSqlConnection()
Deprecated.
Oracle extension
Return the java.sql.Connection associated with the
receiver.
|
oracle.jdbc.internal.OracleLargeObject.PrefetchData<char[]> |
getPrefetchData()
Deprecated.
|
int |
getPrefetchedDataSize()
Deprecated.
|
java.lang.String |
getSubString(long pos,
int length)
Deprecated.
Implements the Clob interface method.
|
oracle.jdbc.driver.OracleClob |
getTarget()
Deprecated.
|
boolean |
isConvertibleTo(java.lang.Class<?> jClass)
Deprecated.
Test whether this data object can be converted to the specified
Java data type.
|
boolean |
isEmptyLob()
Deprecated.
Return true if this is a empty lob.
|
boolean |
isFree()
Deprecated.
|
boolean |
isNCLOB()
Deprecated.
|
boolean |
isOpenLob()
Deprecated.
Check whether the CLOB is opened.
|
boolean |
isSecureFile()
Deprecated.
Returns
true if this is a SecureFile (LOBs with the STORE
AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1). |
boolean |
isTemporary()
Deprecated.
Return true if the lob locator points to a temporary clob.
|
static boolean |
isTemporary(CLOB lob)
Deprecated.
Return true if the lob locator points to a temporary clob.
|
long |
length()
Deprecated.
Implements the Clob interface method.
|
void |
openLob(LargeObjectAccessMode mode)
Deprecated.
Public method using enum instead of int
|
long |
position(java.sql.Clob searchstr,
long start)
Deprecated.
Implements the Clob interface method.
|
long |
position(java.lang.String searchstr,
long start)
Deprecated.
Implements the Clob interface method.
|
int |
putChars(long pos,
char[] chars)
Deprecated.
Oracle extension.
|
int |
putChars(long pos,
char[] chars,
int length)
Deprecated.
Oracle extension.
|
int |
putChars(long pos,
char[] chars,
int offset,
int length)
Deprecated.
Oracle extension.
|
int |
putString(long pos,
java.lang.String str)
Deprecated.
This method is deprecated -- use setString.
|
java.io.OutputStream |
setAsciiStream(long pos)
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. |
void |
setBytes(byte[] locator)
Deprecated.
Sets datum value using a byte array.
|
java.io.Writer |
setCharacterStream(long pos)
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. |
void |
setPrefetchData(oracle.jdbc.internal.OracleLargeObject.PrefetchData<char[]> prefetchData)
Deprecated.
|
int |
setString(long pos,
java.lang.String str)
Deprecated.
JDBC 3.0
Writes the given Java
String to the CLOB
value that this Clob object designates at the position
pos. |
int |
setString(long pos,
java.lang.String str,
int offset,
int len)
Deprecated.
JDBC 3.0
Writes
len characters of str, starting
at character offset, to the CLOB value
that this Clob represents. |
java.lang.String |
stringValue()
Deprecated.
Convert to a String representation of the datum object
|
java.lang.Object |
toJdbc()
Deprecated.
Convert this data object into its default Java object type.
|
java.sql.SQLXML |
toSQLXML()
Deprecated.
Returns an object which impements java.sql.SQLXML with
content take from this Clob.
|
java.sql.SQLXML |
toSQLXML(java.lang.String schemaURL)
Deprecated.
Returns an object which impements java.sql.SQLXML with
content taken from this Clob.
|
void |
trim(long newlen)
Deprecated.
This method is deprecated. Use truncate().
|
void |
truncate(long len)
Deprecated.
JDBC 3.0
Truncates the
CLOB value that this Clob
designates to have a length of len
characters. |
assertNotNull, assertNotNull, getConnection, getConnectionDuringExceptionHandling, getOracleConnectionbigDecimalValue, booleanValue, bytesEqual, bytesHashCode, byteValue, compareBytes, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, isNull, longValue, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue, toClassclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbigDecimalValue, booleanValue, byteValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getLength, getOracleConnection, getStream, intValue, longValue, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValueclose, isOpen, openpublic static final int MAX_CHUNK_SIZE
public static final int DURATION_INVALID
public static final int DURATION_SESSION
public static final int DURATION_CALL
public static final int OLD_WRONG_DURATION_SESSION
public static final int OLD_WRONG_DURATION_CALL
public static final int MODE_READONLY
public static final int MODE_READWRITE
protected oracle.jdbc.driver.OracleClob target
protected CLOB()
protected CLOB(oracle.jdbc.driver.OracleClob c)
public CLOB(OracleConnection conn, byte[] lob_descriptor, short csform) throws java.sql.SQLException
java.sql.SQLExceptionpublic oracle.jdbc.driver.OracleClob getTarget()
public static final short getFormOfUseFromLocator(byte[] lob_descriptor)
public boolean isNCLOB()
public long length()
throws java.sql.SQLException
CLOB value
designated by this Clob object.length in interface java.sql.ClobCLOB in charactersjava.sql.SQLException - if there is an error accessing the
length of the CLOBpublic java.lang.String getSubString(long pos,
int length)
throws java.sql.SQLException
CLOB value
designated by this Clob object.
The substring begins at position
pos and has up to length consecutive
characters.getSubString in interface java.sql.Clobpos - the first character of the substring to be extracted.
The first character is at position 1.length - the number of consecutive characters to be copiedString 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.java.sql.SQLException - if there is an error accessing the
CLOBpublic java.io.Reader getCharacterStream()
throws java.sql.SQLException
Clob contents as a Unicode stream.getCharacterStream in interface java.sql.ClobCLOB datajava.sql.SQLException - if there is an error accessing the
CLOBpublic java.io.InputStream getAsciiStream()
throws java.sql.SQLException
CLOB value designated by this Clob
object as a stream of Ascii bytes.getAsciiStream in interface java.sql.ClobCLOB datajava.sql.SQLException - if there is an error accessing the
CLOB valuepublic java.io.InputStream getAsciiStream(boolean isInternal)
throws java.sql.SQLException
CLOB value designated by this Clob
object as a stream of Ascii bytes.CLOB datajava.sql.SQLException - if there is an error accessing the
CLOB valuepublic long position(java.lang.String searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobsearchstr - is the substring to search for.start - is the position at which to begin searching.java.sql.SQLExceptionpublic long position(java.sql.Clob searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobsearchstr - is the substring to search for.start - is the position at which to begin searching.java.sql.SQLExceptionpublic int getChars(long pos,
int length,
char[] buffer)
throws java.sql.SQLException
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.java.sql.SQLExceptionpublic java.io.Writer getCharacterOutputStream()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.io.OutputStream getAsciiOutputStream()
throws java.sql.SQLException
java.sql.SQLExceptionpublic int putChars(long pos,
char[] chars)
throws java.sql.SQLException
pos - is the position to write characters.chars - is the buffer of characters to be written.java.sql.SQLExceptionpublic int putChars(long pos,
char[] chars,
int length)
throws java.sql.SQLException
pos - is the position to write characters.chars - is the buffer of characters to be written.length - is the length to writejava.sql.SQLExceptionpublic int putChars(long pos,
char[] chars,
int offset,
int length)
throws java.sql.SQLException
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 beginlength - is the length to writejava.sql.SQLExceptionpublic int putString(long pos,
java.lang.String str)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getChunkSize()
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getBufferSize()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static CLOB empty_lob() throws java.sql.SQLException
java.sql.SQLExceptionpublic static CLOB getEmptyCLOB() throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isEmptyLob()
throws java.sql.SQLException
isEmptyLob in interface OracleClobjava.sql.SQLExceptionempty_lobpublic boolean isSecureFile()
throws java.sql.SQLException
true if this is a SecureFile (LOBs with the STORE
AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).isSecureFile in interface OracleClobtrue if this is a SecureFile and false otherwise.java.sql.SQLExceptionpublic java.io.OutputStream getAsciiOutputStream(long pos)
throws java.sql.SQLException
pos - is the position data to be put.java.sql.SQLExceptionpublic java.io.Writer getCharacterOutputStream(long pos)
throws java.sql.SQLException
pos - is the position data to be put.java.sql.SQLExceptionpublic java.io.InputStream getAsciiStream(long pos)
throws java.sql.SQLException
pos - is the position data to be put.java.sql.SQLExceptionpublic java.io.Reader getCharacterStream(long pos)
throws java.sql.SQLException
pos - is the position data to be put.java.sql.SQLExceptionpublic void trim(long newlen)
throws java.sql.SQLException
newlen - the new length of the CLOB.java.sql.SQLExceptionpublic static CLOB createTemporary(java.sql.Connection conn, boolean cache, int _duration) throws java.sql.SQLException
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.java.sql.SQLExceptionpublic static CLOB createTemporary(java.sql.Connection conn, boolean cache, int _duration, short form_of_use) throws java.sql.SQLException
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_NCHARjava.sql.SQLExceptionpublic static void freeTemporary(CLOB temp_lob) throws java.sql.SQLException
temp_lob - A temporary clob to be freeed.java.sql.SQLException - if temp_lob is a permanent lob or temp_lob has
already been freed.public static boolean isTemporary(CLOB lob) throws java.sql.SQLException
lob - the clob to test.java.sql.SQLExceptionpublic static short getDuration(CLOB lob) throws java.sql.SQLException
java.sql.SQLExceptionpublic void freeTemporary()
throws java.sql.SQLException
freeTemporary in interface oracle.jdbc.internal.OracleLargeObject<char[]>java.sql.SQLException - if self is a permanent lob or self has
already been freed.public boolean isTemporary()
throws java.sql.SQLException
isTemporary in interface oracle.jdbc.internal.OracleLargeObject<char[]>isTemporary in interface OracleClobjava.sql.SQLExceptionpublic short getDuration()
throws java.sql.SQLException
getDuration in interface oracle.jdbc.internal.OracleLargeObject<char[]>java.sql.SQLExceptionpublic void openLob(LargeObjectAccessMode mode) throws java.sql.SQLException
openLob in interface OracleClobjava.sql.SQLExceptionpublic void closeLob()
throws java.sql.SQLException
closeLob in interface OracleClobjava.sql.SQLExceptionpublic boolean isOpenLob()
throws java.sql.SQLException
isOpenLob in interface OracleClobjava.sql.SQLExceptionpublic int setString(long pos,
java.lang.String str)
throws java.sql.SQLException
String to the CLOB
value that this Clob object designates at the position
pos.setString in interface java.sql.Clobpos - the position at which to start writing to the CLOB
value that this Clob object representsstr - the string to be written to the CLOB
value that this Clob designatesjava.sql.SQLException - if there is an error accessing the
CLOB valuepublic int setString(long pos,
java.lang.String str,
int offset,
int len)
throws java.sql.SQLException
len characters of str, starting
at character offset, to the CLOB value
that this Clob represents.setString in interface java.sql.Clobpos - the position at which to start writing to this
CLOB objectstr - the string to be written to the CLOB
value that this Clob object representsoffset - the offset into str to start reading
the characters to be writtenlen - the number of characters to be writtenjava.sql.SQLException - if there is an error accessing the
CLOB valuepublic java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
CLOB value that this Clob object represents,
starting at position pos.setAsciiStream in interface java.sql.Clobpos - the position at which to start writing to this
CLOB objectjava.sql.SQLException - if there is an error accessing the
CLOB valuepublic java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
CLOB value that this Clob object
represents, at position pos.setCharacterStream in interface java.sql.Clobpos - the position at which to start writing to the
CLOB valuejava.sql.SQLException - if there is an error accessing the
CLOB valuepublic void truncate(long len)
throws java.sql.SQLException
CLOB value that this Clob
designates to have a length of len
characters.truncate in interface java.sql.Cloblen - the length, in bytes, to which the CLOB value
should be truncatedjava.sql.SQLException - if there is an error accessing the
CLOB valuepublic java.lang.Object toJdbc()
throws java.sql.SQLException
public boolean isConvertibleTo(java.lang.Class<?> jClass)
isConvertibleTo in interface oracle.jdbc.internal.OracleDatumWithConnectionisConvertibleTo in class DatumjClass - specifies the Java data type to test against.public java.lang.String stringValue()
throws java.sql.SQLException
stringValue in interface oracle.jdbc.internal.OracleDatumWithConnectionstringValue in class DatumSQLException, - if no String representation existsjava.sql.SQLExceptionpublic java.sql.Connection getJavaSqlConnection()
throws java.sql.SQLException
DatumWithConnectiongetJavaSqlConnection in interface oracle.jdbc.internal.OracleDatumWithConnectiongetJavaSqlConnection in class DatumWithConnectionjava.sql.SQLException - if an error occurspublic final void setPrefetchData(oracle.jdbc.internal.OracleLargeObject.PrefetchData<char[]> prefetchData)
setPrefetchData in interface oracle.jdbc.internal.OracleLargeObject<char[]>public final oracle.jdbc.internal.OracleLargeObject.PrefetchData<char[]> getPrefetchData()
getPrefetchData in interface oracle.jdbc.internal.OracleLargeObject<char[]>public final int getPrefetchedDataSize()
public boolean canReadBasicLobDataInLocator()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void freeLOB()
throws java.sql.SQLException
freeLOB in interface oracle.jdbc.internal.OracleLargeObject<char[]>java.sql.SQLExceptionpublic void free()
throws java.sql.SQLException
free in interface java.sql.Clobjava.sql.SQLExceptionpublic java.io.Reader getCharacterStream(long pos,
long length)
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobpos - start positionlength - number of characters in the resultjava.sql.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 occurspublic void setBytes(byte[] locator)
Datumpublic java.sql.SQLXML toSQLXML()
throws java.sql.SQLException
toSQLXML in interface OracleClobjava.sql.SQLExceptionpublic java.sql.SQLXML toSQLXML(java.lang.String schemaURL)
throws java.sql.SQLException
toSQLXML in interface OracleClobjava.sql.SQLExceptionpublic final boolean isFree()
isFree in interface oracle.jdbc.internal.OracleLargeObject<char[]>