クラス org.objectweb.cjdbc.driver.Clob

すべてのメンバ一覧

説明

The representation (mapping) in the Java TM programming language of an SQL 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.

作者:
Nicolas Modrzyk
から:
JDK 1.2

Clob.java58 行で定義されています。

Public メソッド

 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

Private 変数

String stringData = null


コンストラクタとデストラクタ

org.objectweb.cjdbc.driver.Clob.Clob String  data  ) 
 

Creates a new Clob instance.

引数:
data a String of character data
Clob.java68 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Clob.stringData.

00069 { 00070 stringData = data; 00071 }


メソッド

java.io.InputStream org.objectweb.cjdbc.driver.Clob.getAsciiStream  )  throws SQLException
 

Retrieves the CLOB value designated by this Clob instance as a stream.

戻り値:
a stream containing the CLOB data
例外:
SQLException if there is an error accessing the CLOB value
から:
JDK 1.2
Clob.java97 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Clob.stringData.

00098 { 00099 return new ByteArrayInputStream(stringData.getBytes()); 00100 }

java.io.Reader org.objectweb.cjdbc.driver.Clob.getCharacterStream  )  throws SQLException
 

Materializes the CLOB value designated by this object as a stream of Unicode character.

戻り値:
A reader object with all the data in the CLOB value designated by this clob object as unicode characters.
例外:
SQLException if there is an error accessing the CLOB value
Clob.java111 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Clob.stringData.

00112 { 00113 return new StringReader(stringData); 00114 }

String org.objectweb.cjdbc.driver.Clob.getSubString long  pos,
int  length
throws SQLException
 

Returns a copy of the portion of the CLOB value represented by this CLOB object that starts at position position and has ip to length consecutive characters.

引数:
pos the position where to get the substring from
length the length of the substring
戻り値:
the substring
例外:
SQLException if there is an error accessing the CLOB
から:
JDK 1.2
Clob.java128 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Clob.length(), と org.objectweb.cjdbc.driver.Clob.stringData.

00129 { 00130 if (length > stringData.length()) 00131 throw new SQLException("Clob contains only " + stringData.length() 00132 + " characters (asking for " + length + ")."); 00133 return stringData.substring((int) pos, length); 00134 }

long org.objectweb.cjdbc.driver.Clob.length  )  throws SQLException
 

Returns the size of the CLOB value designated by this Clob object

戻り値:
length of the CLOB value that this clob represents
例外:
SQLException if there is an error accessing the length of the CLOB
から:
JDK 1.2
Clob.java83 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Clob.stringData.

参照元 org.objectweb.cjdbc.driver.Clob.getSubString().

00084 { 00085 return stringData.length(); 00086 }

long org.objectweb.cjdbc.driver.Clob.position java.sql.Clob  searchstr,
long  start
throws SQLException
 

Retrieves the character position at which the specified Clob object searchstr begins within the CLOB value that this Clob object represents. The search for searchstr begins at position start.

引数:
searchstr the byte array for which to search
start the position at which to begin searching; the first position is 1
戻り値:
the position at which the pattern appears, else -1
例外:
SQLException if there is an error accessing the CLOB
から:
JDK 1.2
Clob.java169 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Clob.position().

00170 { 00171 return position(searchstr.getSubString(0, (int) searchstr.length()), 00172 (int) start); 00173 }

long org.objectweb.cjdbc.driver.Clob.position String  searchstr,
long  start
throws SQLException
 

Retrieves the character position at which the specified string searchstr begins within the CLOB value that this Clob object represents. The search for searchstr begins at position start.

引数:
searchstr the byte array for which to search
start the position at which to begin searching; the first position is 1
戻り値:
the position at which the pattern appears, else -1
例外:
SQLException if there is an error accessing the CLOB
から:
JDK 1.2
Clob.java150 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Clob.stringData.

参照元 org.objectweb.cjdbc.driver.Clob.position().

00151 { 00152 return stringData.indexOf(searchstr, (int) start); 00153 }

OutputStream org.objectweb.cjdbc.driver.Clob.setAsciiStream long  pos  )  throws SQLException
 

Retrieves a stream to be used to write Ascii characters to the CLOB value that this Clob object represents, starting at position pos.

引数:
pos the position where to start the stream
戻り値:
the ascii outputstream to this clob object
例外:
SQLException if there is an error accessing the clob
Clob.java185 行で定義されています。
00186 { 00187 throw new NotImplementedException("setAsciiStream"); 00188 }

Writer org.objectweb.cjdbc.driver.Clob.setCharacterStream long  pos  )  throws SQLException
 

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.

引数:
pos the position where to start the writer
戻り値:
the writer to this clob object
例外:
SQLException if there is an error accessing the clob
Clob.java198 行で定義されています。
00199 { 00200 throw new NotImplementedException("setCharacterStream"); 00201 }

int org.objectweb.cjdbc.driver.Clob.setString long  pos,
String  str,
int  offset,
int  len
throws SQLException
 

Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.

引数:
pos the position
str the string
offset the offset
len the length
戻り値:
return value
例外:
SQLException if there is an error accessing the clob
Clob.java228 行で定義されています。
00230 { 00231 throw new NotImplementedException("setString"); 00232 }

int org.objectweb.cjdbc.driver.Clob.setString long  pos,
String  str
throws SQLException
 

Writes the given Java String to the CLOB value that this Clob object designates at the position pos.

引数:
pos the position where to set the string
str string to insert in the clob
戻り値:
return value
例外:
SQLException if there is an error accessing the clob
Clob.java212 行で定義されています。
00213 { 00214 throw new NotImplementedException("setString"); 00215 }

void org.objectweb.cjdbc.driver.Clob.truncate long  len  )  throws SQLException
 

Truncates the CLOB value that this Clob designates to have a length of len characters.

引数:
len the length
例外:
SQLException if there is an error accessing the clob
Clob.java241 行で定義されています。
00242 { 00243 throw new NotImplementedException("truncate"); 00244 }


変数

String org.objectweb.cjdbc.driver.Clob.stringData = null [private]
 

The data represented as a string of this CLOB Clob.java61 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Clob.Clob(), org.objectweb.cjdbc.driver.Clob.getAsciiStream(), org.objectweb.cjdbc.driver.Clob.getCharacterStream(), org.objectweb.cjdbc.driver.Clob.getSubString(), org.objectweb.cjdbc.driver.Clob.length(), と org.objectweb.cjdbc.driver.Clob.position().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.1に対してWed Aug 18 09:20:31 2004に生成されました。 doxygen 1.3.8