티스토리 뷰

Developer/Java, Kotlin

Clob -> String 변환

데브포유 2013. 5. 27. 10:55
반응형

 public static String clobToString(CLOB clob) throws Exception {
        StringBuffer s = new StringBuffer();
        BufferedReader br = new BufferedReader(clob.getCharacterStream());
        String ts = "";
        while((ts = br.readLine()) != null) {
               s.append(ts + "\n");
        }
        br.close();
        return s.toString();
 }



반응형