Serializable
, Clob
, oracle.jdbc.internal.ACProxyable
, oracle.jdbc.internal.OracleClob
, oracle.jdbc.internal.OracleConcreteProxy
, oracle.jdbc.internal.OracleDatumWithConnection
, oracle.jdbc.internal.OracleLargeObject
, OracleClob
NCLOB
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 FormModifier and Type | Field | 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.
|
ojiOracleDatumWithConnection, targetDatum
targetDatumWithConnection
Modifier | Constructor | 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 | Description |
---|---|---|
boolean |
canReadBasicLobDataInLocator() |
Deprecated.
Can the lob data be read directly from the locator?
|
void |
close() |
Deprecated.
Close a previously opened CLOB.
|
static CLOB |
createTemporary(Connection conn, boolean cache, int _duration) |
Deprecated.
Create a temporary clob.
|
static CLOB |
createTemporary(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 |
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.
|
OutputStream |
getAsciiOutputStream() |
Deprecated.
This method is deprecated.
|
OutputStream |
getAsciiOutputStream(long pos) |
Deprecated.
This method is deprecated.
|
InputStream |
getAsciiStream() |
Deprecated.
Implements the Clob interface method.
|
InputStream |
getAsciiStream(boolean isInternal) |
Deprecated.
Implements the Clob interface method.
|
InputStream |
getAsciiStream(long pos) |
Deprecated.
Read from the CLOB as a stream at the requested position.
|
int |
getBufferSize() |
Deprecated.
Oracle extension.
|
Writer |
getCharacterOutputStream() |
Deprecated.
This method is deprecated.
|
Writer |
getCharacterOutputStream(long pos) |
Deprecated.
This method is deprecated.
|
Reader |
getCharacterStream() |
Deprecated.
Implements the Clob interface method.
|
Reader |
getCharacterStream(long pos) |
Deprecated.
Read from the CLOB as a stream at the requested position.
|
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.
|
Connection |
getJavaSqlConnection() |
Deprecated.
Oracle extension Return the java.sql.Connection associated with the receiver.
|
int |
getPrefetchedDataSize() |
Deprecated.
|
String |
getSubString(long pos, int length) |
Deprecated.
Implements the Clob interface method.
|
oracle.jdbc.driver.OracleClob |
getTarget() |
Deprecated.
|
boolean |
isConvertibleTo(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 |
isNCLOB() |
Deprecated.
|
boolean |
isOpen() |
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 |
open(LargeObjectAccessMode mode) |
Deprecated.
Public method using enum instead of int
|
long |
position(String searchstr, long start) |
Deprecated.
Implements the Clob interface method.
|
long |
position(Clob 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, String str) |
Deprecated.
This method is deprecated -- use setString.
|
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.
|
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 . |
int |
setString(long pos, 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, 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. |
String |
stringValue() |
Deprecated.
Convert to a String representation of the datum object
|
Object |
toJdbc() |
Deprecated.
Convert this data object into its default Java object type.
|
SQLXML |
toSQLXML() |
Deprecated.
Returns an object which impements java.sql.SQLXML with content take from this Clob.
|
SQLXML |
toSQLXML(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.
|
void |
truncate(long len) |
Deprecated.
JDBC 3.0 Truncates the
CLOB value that this Clob designates to have a length of len characters. |
bigDecimalValue, booleanValue, bytesEqual, bytesHashCode, byteValue, compareBytes, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, isNull, longValue, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue, toClass
assertNotNull, assertNotNull, getConnection, getConnectionDuringExceptionHandling, getOracleConnection
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bigDecimalValue, booleanValue, byteValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getLength, getOracleConnection, getStream, intValue, longValue, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue
public 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 SQLException
SQLException
public oracle.jdbc.driver.OracleClob getTarget()
public static final short getFormOfUseFromLocator(byte[] lob_descriptor)
public boolean isNCLOB()
isNCLOB
in interface oracle.jdbc.internal.OracleClob
public long length() throws SQLException
CLOB
value designated by this Clob
object.length
in interface Clob
CLOB
in charactersSQLException
- if there is an error accessing the length of the CLOB
public String getSubString(long pos, int length) throws SQLException
CLOB
value designated by this Clob
object. The substring begins at position pos
and has up to length
consecutive characters.getSubString
in interface Clob
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 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.SQLException
- if there is an error accessing the CLOB
public Reader getCharacterStream() throws SQLException
Clob
contents as a Unicode stream.getCharacterStream
in interface Clob
CLOB
dataSQLException
- if there is an error accessing the CLOB
public InputStream getAsciiStream() throws SQLException
CLOB
value designated by this Clob
object as a stream of Ascii bytes.getAsciiStream
in interface Clob
CLOB
dataSQLException
- if there is an error accessing the CLOB
valuepublic InputStream getAsciiStream(boolean isInternal) throws SQLException
CLOB
value designated by this Clob
object as a stream of Ascii bytes.CLOB
dataSQLException
- if there is an error accessing the CLOB
valuepublic long position(String searchstr, long start) throws SQLException
position
in interface Clob
searchstr
- is the substring to search for.start
- is the position at which to begin searching.SQLException
public long position(Clob searchstr, long start) throws SQLException
position
in interface Clob
searchstr
- is the substring to search for.start
- is the position at which to begin searching.SQLException
public int getChars(long pos, int length, char[] buffer) throws SQLException
getChars
in interface oracle.jdbc.internal.OracleClob
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.SQLException
public Writer getCharacterOutputStream() throws SQLException
getCharacterOutputStream
in interface oracle.jdbc.internal.OracleClob
SQLException
public OutputStream getAsciiOutputStream() throws SQLException
getAsciiOutputStream
in interface oracle.jdbc.internal.OracleClob
SQLException
public int putChars(long pos, char[] chars) throws SQLException
putChars
in interface oracle.jdbc.internal.OracleClob
pos
- is the position to write characters.chars
- is the buffer of characters to be written.SQLException
public int putChars(long pos, char[] chars, int length) throws SQLException
pos
- is the position to write characters.chars
- is the buffer of characters to be written.length
- is the length to writeSQLException
public int putChars(long pos, char[] chars, int offset, int length) throws SQLException
putChars
in interface oracle.jdbc.internal.OracleClob
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 writeSQLException
public int putString(long pos, String str) throws SQLException
putString
in interface oracle.jdbc.internal.OracleClob
SQLException
public int getChunkSize() throws SQLException
getChunkSize
in interface oracle.jdbc.internal.OracleClob
SQLException
public int getBufferSize() throws SQLException
getBufferSize
in interface oracle.jdbc.internal.OracleClob
SQLException
public static CLOB empty_lob() throws SQLException
SQLException
public static CLOB getEmptyCLOB() throws SQLException
SQLException
public boolean isEmptyLob() throws SQLException
isEmptyLob
in interface OracleClob
SQLException
empty_lob()
public boolean isSecureFile() throws 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 OracleClob
true
if this is a SecureFile and false
otherwise.SQLException
public OutputStream getAsciiOutputStream(long pos) throws SQLException
getAsciiOutputStream
in interface oracle.jdbc.internal.OracleClob
pos
- is the position data to be put.SQLException
public Writer getCharacterOutputStream(long pos) throws SQLException
getCharacterOutputStream
in interface oracle.jdbc.internal.OracleClob
pos
- is the position data to be put.SQLException
public InputStream getAsciiStream(long pos) throws SQLException
getAsciiStream
in interface oracle.jdbc.internal.OracleClob
pos
- is the position data to be put.SQLException
public Reader getCharacterStream(long pos) throws SQLException
getCharacterStream
in interface oracle.jdbc.internal.OracleClob
pos
- is the position data to be put.SQLException
public void trim(long newlen) throws SQLException
trim
in interface oracle.jdbc.internal.OracleClob
newlen
- the new length of the CLOB.SQLException
public static CLOB createTemporary(Connection conn, boolean cache, int _duration) throws 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.SQLException
public static CLOB createTemporary(Connection conn, boolean cache, int _duration, short form_of_use) throws 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_NCHARSQLException
public static void freeTemporary(CLOB temp_lob) throws SQLException
temp_lob
- A temporary clob to be freeed.SQLException
- if temp_lob is a permanent lob or temp_lob has already been freed.public static boolean isTemporary(CLOB lob) throws SQLException
lob
- the clob to test.SQLException
public static short getDuration(CLOB lob) throws SQLException
SQLException
public void freeTemporary() throws SQLException
freeTemporary
in interface oracle.jdbc.internal.OracleLargeObject
SQLException
- if self is a permanent lob or self has already been freed.public boolean isTemporary() throws SQLException
isTemporary
in interface OracleClob
isTemporary
in interface oracle.jdbc.internal.OracleLargeObject
SQLException
public short getDuration() throws SQLException
getDuration
in interface oracle.jdbc.internal.OracleLargeObject
SQLException
public void open(LargeObjectAccessMode mode) throws SQLException
open
in interface OracleClob
SQLException
public void close() throws SQLException
close
in interface OracleClob
SQLException
public boolean isOpen() throws SQLException
isOpen
in interface OracleClob
SQLException
public int setString(long pos, String str) throws SQLException
String
to the CLOB
value that this Clob
object designates at the position pos
.setString
in interface Clob
pos
- 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
designatesSQLException
- if there is an error accessing the CLOB
valuepublic int setString(long pos, String str, int offset, int len) throws SQLException
len
characters of str
, starting at character offset
, to the CLOB
value that this Clob
represents.setString
in interface Clob
pos
- 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 writtenSQLException
- if there is an error accessing the CLOB
valuepublic OutputStream setAsciiStream(long pos) throws SQLException
CLOB
value that this Clob
object represents, starting at position pos
.setAsciiStream
in interface Clob
pos
- the position at which to start writing to this CLOB
objectSQLException
- if there is an error accessing the CLOB
valuepublic Writer setCharacterStream(long pos) throws SQLException
CLOB
value that this Clob
object represents, at position pos
.setCharacterStream
in interface Clob
pos
- the position at which to start writing to the CLOB
valueSQLException
- if there is an error accessing the CLOB
valuepublic void truncate(long len) throws SQLException
CLOB
value that this Clob
designates to have a length of len
characters.truncate
in interface Clob
len
- the length, in bytes, to which the CLOB
value should be truncatedSQLException
- if there is an error accessing the CLOB
valuepublic Object toJdbc() throws SQLException
toJdbc
in interface oracle.jdbc.internal.OracleClob
toJdbc
in interface oracle.jdbc.internal.OracleDatumWithConnection
toJdbc
in class Datum
SQLException
- if any of the lower layer code throws an exception.public boolean isConvertibleTo(Class jClass)
isConvertibleTo
in interface oracle.jdbc.internal.OracleClob
isConvertibleTo
in interface oracle.jdbc.internal.OracleDatumWithConnection
isConvertibleTo
in class Datum
jClass
- specifies the Java data type to test against.public String stringValue() throws SQLException
stringValue
in interface oracle.jdbc.internal.OracleClob
stringValue
in interface oracle.jdbc.internal.OracleDatumWithConnection
stringValue
in class Datum
SQLException
public Connection getJavaSqlConnection() throws SQLException
DatumWithConnection
getJavaSqlConnection
in interface oracle.jdbc.internal.OracleClob
getJavaSqlConnection
in interface oracle.jdbc.internal.OracleDatumWithConnection
getJavaSqlConnection
in class DatumWithConnection
SQLException
- if an error occurspublic final int getPrefetchedDataSize()
getPrefetchedDataSize
in interface oracle.jdbc.internal.OracleClob
public boolean canReadBasicLobDataInLocator() throws SQLException
canReadBasicLobDataInLocator
in interface oracle.jdbc.internal.OracleClob
SQLException
public void free() throws SQLException
free
in interface Clob
SQLException
public Reader getCharacterStream(long pos, long length) throws SQLException
getCharacterStream
in interface Clob
pos
- start positionlength
- number of characters in the resultSQLException
- - 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)
Datum
public SQLXML toSQLXML() throws SQLException
toSQLXML
in interface OracleClob
SQLException
public SQLXML toSQLXML(String schemaURL) throws SQLException
toSQLXML
in interface OracleClob
SQLException