
public static String readClobData(Reader reader) throws IOException {
StringBuffer data = new StringBuffer();
char[] buf = new char[1024];
int cnt = 0;
if (null != reader) {
while ( (cnt = reader.read(buf)) != -1) {
data.append(buf, 0, cnt);
}
}
return data.toString();
}
if(rs.next()){
String clobData = readClobData(rs.getCharacterStream("CONTENT"));
content = new String(clobData.getBytes("utf-8"), "utf-8");
actionForm.setContent(content);
}
//GET LOB DATA
'프로그래밍 > java' 카테고리의 다른 글
현재시간 생성 (0) | 2010.12.28 |
---|---|
Junit 사용법 (0) | 2010.12.28 |
GC 로그 생성 및 HPJtune (0) | 2010.12.28 |