clob 类型 转换 String 类型

    public String ClobToString(Clob clob) throws SQLException, IOException {
      String str = "";
      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();
      }
      str= sb.toString();
      if(br!=null){
          br.close();
      }
      if(is!=null){
          is.close();
      }
      return str;
     }
原文地址:https://www.cnblogs.com/yishang/p/8664257.html