oracle你得用oracle.sql.CLOB读出!

解决方案 »

  1.   

    以下就是我读clob数据的代码,读是能读出来,问题就是,它把<pre></pre>之间的格式去了读出来一整行,不知有没有别的好方法来读取数据,请高手指点一二
    oracle.sql.CLOB clob=(oracle.sql.CLOB)rs.getClob("content");
     if (clob !=null)
     {
      Reader rd=clob.getCharacterStream();
    BufferedReader br=new BufferedReader(rd);
    String s=br.readLine();
    while(s !=null)
    {
    content+=s;
    s = br.readLine();
    }
      

  2.   

    原来是readline的问题,一行一行读的话,把<pre></pre>之间的东东认为是一行了