java.sql.Clob
java.sql.Clob接口提供用于获取SQL字符大对象,访问SQL CLOB值。
| 方法名 | 返回值 | 描述 | throws |
|---|---|---|---|
| length() | long | 返回Clob字符数。 | SQLException |
| getSubString(long pos, int length) | String | 检索返回从pos开始最多包含length的连续字符串。 | SQLException |
| getCharacterStream() | java.io.Reader | 返回包含Clob值的字符串流。 | SQLException |
| getAsciiStream() | java.io.InputStream | 返回包含Clob值的ASCII流。 须知: 目前不支持该方法。 | SQLException |
| position(String searchstr, long start) | long | 检索指定的字符串,搜索从start位置开始,返回检索的字符串出现的第一个位置。 | SQLException |
| position(Clob searchstr, long start) | long | 检索指定的Clob,搜索从start位置开始,返回检索的Clob出现的第一个位置。 | SQLException |
| setString(long pos, String str) | int | 在指定的pos位置开始,写入str到Clob中。 | SQLException |
| setString(long pos, String str, int offset, int len) | int | 在指定的pos位置开始,写入偏移offset量的长度为len的str对象到Clob中。 | SQLException |
| setAsciiStream(long pos) | java.io.OutputStream | 返回一个从pos位置开始,能写入字符到Clob对象中的ASCII流。 须知: 目前不支持该方法。 | SQLException |
| setCharacterStream(long pos) | java.io.Writer | 返回一个从pos位置开始,能写入字符到Clob对象中的字符流。 须知: 目前不支持该方法。 | SQLException |
| truncate(long len) | void | 截断len长度的Clob字符串。 | SQLException |
| free() | void | 释放Clob对象,并且释放资源。 | SQLException |
| getCharacterStream(long pos, long length) | Reader | 返回一个Reader包含部分Clob值的对象,该值以pos指定字符开头,长度为length。 | SQLException |