public string clobtostring(clob clob) throws sqlexception, ioexception {
reader is = clob.getcharacterstream();
bufferedreader br = new bufferedreader(is);
string s = br.readline();
stringbuffer sb = new stringbuffer();
while (s != null) {
sb.append(s);
s = br.readline();
}
string restring = sb.tostring();
return restring;
}