What's wrong with:
clob.getSubString(1, (int) clob.length());
?
For example Oracle oracle.sql.CLOB
performs getSubString()
on internal char[]
which defined in oracle.jdbc.driver.T4CConnection
and just System.arraycopy()
and next wrap to String
... You never get faster reading than System.arraycopy()
.
UPDATE Get driver ojdbc6.jar, decompile CLOB
implementation, and study which case could be faster based on the internals knowledge.