"I'm using the Oracle Thin drivers to store an Oracle CLOB via an EJB under iPlanet 6.0 sp3. However, the code I've got seems to be a bit of a kludge. Is there a more elegant way of doing things other than the code posted below?


1.
insert record via JDBC with empty CLOB


2.
select created record via JDBC


3.
if (rsResultSet.next())
{
    CLOB clob = ((OracleResultSet)rsResultSet).getCLOB("xml_data");
    OutputStream outstream = clob.getAsciiOutputStream();
    int iChunk = clob.getChunkSize();
    byte[] buffer = new byte[iChunk];
    buffer = details.getXmlData().getBytes();
    outstream.write(buffer);
    outstream.close();
}


Thanks,
Richard Kenyon"