Writer writer = ((CLOB)clob).getCharacterOutputStream();
Reader src = new CharArrayReader(contentData.toCharArray());
char[] buffer = new char[1024];
int read = 0;
while ( (read = src.read(buffer,0,1024)) != -1)
{
writer.write(buffer, 0, read); // write clob.
}
src.close();
writer.close();
/**********************************************
* weblogic
* ********************************************/
Clob clob = rs.getClob(1);
Writer writer = ((OracleClob)clob).getCharacterOutputStream();
Reader src = new CharArrayReader(contentData.toCharArray());
char[] buffer = new char[1024];
int read = 0;
while ( (read = src.read(buffer,0,1024)) != -1)
{
writer.write(buffer, 0, read); // write clob.
}
src.close();
writer.close();
/**********************************************
* sunone
* ********************************************/
Clob clob = rs.getClob(1);
Writer characterStream = clob.setCharacterStream(0);
characterStream.write(contentData);
characterStream.close();
/**********************************************
* interstage
* ********************************************/
CLOB clob = ((OracleResultSet)((DelegatingResultSet)rs).getDelegate()).getCLOB(1);
BufferedWriter writer = new BufferedWriter(clob.getCharacterOutputStream());
writer.write(form.getContent());
writer.close();
/**********************************************
*Jeus
* ********************************************/
String upSql = " SELECT CONTENTS FROM CURRICULUM " +
" WHERE SITE_ID = ? AND CURRICULUM_ID = ? AND CURRICULUM_SEQ = ? FOR UPDATE ";
ps = con.prepareStatement(upSql);
ps.setString(1, sSite_id);
ps.setInt(2, Integer.parseInt(sCurriculum_id));
ps.setInt(3, Integer.parseInt(sCurriculum_seq));
rs = ps.executeQuery();
java.sql.Clob clob = rs.getClob("CONTENTS");
Writer writer = ((CLOB)clob).getCharacterOutputStream();
Reader src = new CharArrayReader(sContents.toCharArray());
char[] buffer = new char[1024];
int read = 0;
while ( (read = src.read(buffer, 0, 1024)) != -1){
writer.write(buffer, 0, read);
}
src.close();
writer.close();
출 처 : http://blog.naver.com/matrix1597?Redirect=Log&logNo=70091352700
'Java' 카테고리의 다른 글
이클립스에 자바 디컴파일(jad) 플러그인 추가 (2) | 2011.06.10 |
---|---|
clob (2) | 2010.12.09 |
자바 디컴파일 - jad 1.58 (1) | 2010.12.04 |
자바 이전버전 관련해서 다운로드 사이트 (1) | 2010.12.02 |
싱글턴(Singleton) 패턴 (1) | 2010.03.16 |