标签:clob转string clob
/** * 将Clob对象转换成String对象 * @param clob * @return * @throws SQLException * @throws IOException */ public static String ClobToString(Clob clob) throws SQLException, IOException{ String str=""; Reader reader=clob.getCharacterStream();//得到流 BufferedReader bReader=new BufferedReader(reader); String s = bReader.readLine(); StringBuffer strBuffer = new StringBuffer(); while(s!=null){//执行循环将字符串全部取出附值给StringBuffer由StringBuffer转成String strBuffer.append(s); s=bReader.readLine(); } str=strBuffer.toString(); return str; }
标签:clob转string clob
原文地址:http://blog.csdn.net/u013474104/article/details/45079323