java读取oracle中的Blob字段

if(null == rs.getClob("content")){
return "";
}
Reader in = null;
    in = rs.getClob("content").getCharacterStream();
    String s = "";
    String str = "";
    BufferedReader br = new BufferedReader(in);
    try {
        while((str = br.readLine()) != null){
           s = s.concat(str+"\n");
        }
       // System.out.println("xxxxxxxxxxxxxxxxxxxxx---i="+i);
    }
    catch(Exception e) {
        throw new Exception(");
    } finally {
        in.close();
    }
    return s;

你可能感兴趣的:(oracle)