Public Member Functions | |
Clob (String data) | |
long | length () throws SQLException |
java.io.InputStream | getAsciiStream () throws SQLException |
java.io.Reader | getCharacterStream () throws SQLException |
String | getSubString (long pos, int length) throws SQLException |
long | position (String searchstr, long start) throws SQLException |
long | position (java.sql.Clob searchstr, long start) throws SQLException |
OutputStream | setAsciiStream (long pos) throws SQLException |
Writer | setCharacterStream (long pos) throws SQLException |
int | setString (long pos, String str) throws SQLException |
int | setString (long pos, String str, int offset, int len) throws SQLException |
void | truncate (long len) throws SQLException |
CLOB
value. An SQL CLOB
is a built-in type that stores a Character Large Object as a column value in a row of a database table. By default drivers implement Clob
using an SQL locator(CLOB)
, which means that a Clob
object contains a logical pointer to the SQL CLOB
data rather than the data itself. A Clob
object is valid for the duration of the transaction in which is was created.
Methods in the interfaces DriverResultSet,CallableStatement, and PreparedStatement, such as getClob
and setClob
allow a programmer to access an SQL CLOB
value. The Clob
interface provides methods for getting the length of an SQL CLOB
(Character Large Object) value, for materializing a CLOB
value on the client, and for determining the position of a pattern of bytes within a CLOB
value. In addition, this interface has methods for updating a CLOB
value.
Definition at line 59 of file Clob.java.
|
Creates a new
Definition at line 69 of file Clob.java. 00070 { 00071 stringData = data; 00072 }
|
|
Retrieves the
Definition at line 98 of file Clob.java. 00099 { 00100 return new ByteArrayInputStream(stringData.getBytes()); 00101 }
|
|
Materializes the
Definition at line 112 of file Clob.java. 00113 { 00114 return new StringReader(stringData); 00115 }
|
|
Returns a copy of the portion of the
Definition at line 129 of file Clob.java. References org.objectweb.cjdbc.driver.Clob.length(). 00130 { 00131 if (length > stringData.length()) 00132 throw new SQLException("Clob contains only " + stringData.length() 00133 + " characters (asking for " + length + ")."); 00134 return stringData.substring((int) pos, length); 00135 }
|
|
Returns the size of the
Definition at line 84 of file Clob.java. Referenced by org.objectweb.cjdbc.driver.Clob.getSubString(). 00085 {
00086 return stringData.length();
00087 }
|
|
Retrieves the character position at which the specified
Definition at line 170 of file Clob.java. References org.objectweb.cjdbc.driver.Clob.position(). 00171 { 00172 return position(searchstr.getSubString(0, (int) searchstr.length()), 00173 (int) start); 00174 }
|
|
Retrieves the character position at which the specified string
Definition at line 151 of file Clob.java. Referenced by org.objectweb.cjdbc.driver.Clob.position(). 00152 { 00153 return stringData.indexOf(searchstr, (int) start); 00154 }
|
|
Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.
Definition at line 186 of file Clob.java. 00187 { 00188 throw new NotImplementedException("setAsciiStream"); 00189 }
|
|
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.
Definition at line 199 of file Clob.java. 00200 { 00201 throw new NotImplementedException("setCharacterStream"); 00202 }
|
|
Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.
Definition at line 229 of file Clob.java. 00231 { 00232 throw new NotImplementedException("setString"); 00233 }
|
|
Writes the given Java String to the CLOB value that this Clob object designates at the position pos.
Definition at line 213 of file Clob.java. 00214 { 00215 throw new NotImplementedException("setString"); 00216 }
|
|
Truncates the CLOB value that this Clob designates to have a length of len characters.
Definition at line 242 of file Clob.java. 00243 { 00244 throw new NotImplementedException("truncate"); 00245 }
|