| 
 | Java Platform 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
JDBC 2.0
 The mapping in the JavaTM programming language 
 for the SQL CLOB type.
 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.
 The driver implements a Clob object 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 it was created.
 
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
 searching for a substring or CLOB object within a
 CLOB value.
 Methods in the interfaces ResultSet,
 CallableStatement, and PreparedStatement, such as
 getClob and setClob allow a programmer to
 access the SQL CLOB.
| Method Summary | |
|  InputStream | getAsciiStream()Gets the CLOBvalue designated by thisClobobject as a stream of Ascii bytes. | 
|  Reader | getCharacterStream()Gets the Clobcontents as a Unicode stream. | 
|  String | getSubString(long pos,
             int length)Returns a copy of the specified substring in the CLOBvalue
 designated by thisClobobject. | 
|  long | length()Returns the number of characters in the CLOBvalue
 designated by thisClobobject. | 
|  long | position(Clob searchstr,
         long start)Determines the character position at which the specified Clobobjectsearchstrappears in thisClobobject. | 
|  long | position(String searchstr,
         long start)Determines the character position at which the specified substring searchstrappears in theCLOB. | 
| Method Detail | 
public long length()
            throws SQLException
CLOB value
 designated by this Clob object.CLOB in charactersCLOB
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.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 objectCLOB
public Reader getCharacterStream()
                          throws SQLException
Clob contents as a Unicode stream.CLOB dataCLOB
public InputStream getAsciiStream()
                           throws SQLException
CLOB value designated by this Clob
 object as a stream of Ascii bytes.CLOB dataCLOB value
public long position(String searchstr,
                     long start)
              throws SQLException
searchstr appears in the CLOB.  The search 
 begins at position start.searchstr - the substring for which to searchstart - the position at which to begin searching; the first position
              is 1CLOB value
public long position(Clob searchstr,
                     long start)
              throws SQLException
Clob object searchstr appears in this 
 Clob object.  The search begins at position 
 start.searchstr - the Clob object for which to searchstart - the position at which to begin searching; the first
              position is 1Clob object appears, 
 else -1; the first position is 1CLOB value| 
 | Java Platform 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||