`
siashuayongsheng
  • 浏览: 121233 次
  • 性别: Icon_minigender_1
  • 来自: 郑州
社区版块
存档分类
最新评论

oracle学习

阅读更多
public static String oracleClob2Str(Clob clob) throws Exception {
  String str = "";
  InputStream input = clob.getAsciiStream();
          int len = (int)clob.length();
          byte[] by = new byte[len];
          int i ;
          while(-1 != (i = input.read(by, 0, by.length))){
             input.read(by, 0, i);
          }
          str = new String(by);
          str=clob.getSubString((long)1,(int)clob.length());
          return str;
    }


分享到:
评论
Global site tag (gtag.js) - Google Analytics