public static String ClobToString(Clob clob) throws SQLException, IOException { if(clob!=null){ // 得到流 Reader is = clob.getCharacterStream(); BufferedReader br = new BufferedReader(is); String s = br.readLine(); StringBuffer sb = new StringBuffer(); // 执行循环将字符串全部取出付值给StringBuffer由StringBuffer转成STRING while (s != null) { sb.append(s); s = br.readLine(); } String reString = sb.toString(); return reString; }else{ return ""; } }
oralce 将CLOB转成String类型
最新推荐文章于 2025-05-25 16:26:37 发布