KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > sql > Clob

java.sql
Interface Clob

All Known Implementing Classes:
SerialClob
See Also:
Top Examples, Source Code, PreparedStatement, CallableStatement, ResultSet

InputStream getAsciiStream()
                           throws SQLException
See Also:
setAsciiStream(long)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[92]CLOB value as a byte stream containing Ascii bytes
By Anonymous on 2003/12/30 11:49:35  Rate
//getAsciiStream materializes the CLOB value as a byte stream containing Ascii bytes  
 Clob notes = rs.getClob ( "NOTES" ) ; 
 java.io.InputStream in = notes.getAsciiStream (  ) ; 
 byte b = in.read (  ) ; 
 // in contains the characters in the CLOB value designated by 
 // notes as Ascii bytes; b contains the first character as an Ascii  
 // byte


Reader getCharacterStream()
                          throws SQLException
See Also:
setCharacterStream(long)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[93]CLOB value as a stream of Unicode characters
By Anonymous on 2002/10/17 17:50:17  Rate
//getCharacterStream materializes the CLOB value as a stream of Unicode characters  
 Clob notes = rs.getClob ( "NOTES" ) ; 
 java.io.Reader reader = notes.getCharacterStream (  ) ; 
 int c = Reader.read (  ) ; 
 // c contains the first character in the CLOB that notes designates


String getSubString(long pos,
                    int length)
                    throws SQLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[94]CLOB value as a String object
By Anonymous on 2003/10/04 17:08:52  Rate
 
 //getSubString materializes all or part of the CLOB value as a String object  
 Clob notes = rs.getClob ( "NOTES" ) ; 
 String substring = notes.getSubString ( 10, 5 ) ; 
 // substring contains five characters, starting with the tenth 
 // character of the CLOB value that notes designates 
 long len = notes.length (  ) ; 
 String substring = notes.getSubString ( 1, len ) ; 
 // substring contains all of the characters in the CLOB object that 
 // notes designates


long length()
            throws SQLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


long position(String searchstr,
              long start)
              throws SQLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


long position(Clob searchstr,
              long start)
              throws SQLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


OutputStream setAsciiStream(long pos)
                            throws SQLException
See Also:
getAsciiStream()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


Writer setCharacterStream(long pos)
                          throws SQLException
See Also:
getCharacterStream()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


int setString(long pos,
              String str)
              throws SQLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


int setString(long pos,
              String str,
              int offset,
              int len)
              throws SQLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


void truncate(long len)
              throws SQLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags