1. Clob 데이터를 처리하는 메쏘드를 생성.


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();

}


2. 데이터를 얻어와서 처리.


.

.

.

String content = clobToString(rs.getClob("content"));

vo.setContent(content);

.

.

.



+ Recent posts