oracle函数clob转str,Clob转换成String // 将字CLOB转成STRING类型
public String ClobToString(Clob clob) throws SQLException, IOException {
if (clob==null) {
return "";
}
String reString = "";
Reader is = CharacterStream();// 得到流
BufferedReader br = new BufferedReader(is);
String s = br.readLine();
StringBuffer sb = new StringBuffer();
c++string类型while (s != null) {// 执⾏循环将字符串全部取出付值给StringBuffer由StringBuffer转成STRING
sb.append(s);
s = br.readLine();
}
reString = sb.toString();
return reString;
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。