/** */
/**
* CLOB转换为STRING处理
* @author: testjava
*/
public static String clob2string(Clob c)
... {
StringBuffer sb = new StringBuffer(1024);
Reader instream = null;
try...{
instream = c.getCharacterStream();
char[] buffer = new char[(int)c.length()];
int length = 0;
while ((length = instream.read(buffer)) != -1)...{
sb.append(buffer);
}
}
catch(Exception ex)...{
ex.printStackTrace();
}
finally...{
try...{
if(instream != null) instream.close();
}
catch(Exception dx)...{
instream = null;
}
return sb.toString();
}
}
* CLOB转换为STRING处理
* @author: testjava
*/
public static String clob2string(Clob c)
... {
StringBuffer sb = new StringBuffer(1024);
Reader instream = null;
try...{
instream = c.getCharacterStream();
char[] buffer = new char[(int)c.length()];
int length = 0;
while ((length = instream.read(buffer)) != -1)...{
sb.append(buffer);
}
}
catch(Exception ex)...{
ex.printStackTrace();
}
finally...{
try...{
if(instream != null) instream.close();
}
catch(Exception dx)...{
instream = null;
}
return sb.toString();
}
}