BLOB.getBytes() and CLOB.getSubString()
843859Aug 4 2008 — edited Aug 6 2008Hello,
I have a question concerning 2 methods of the JDBC driver.
Class java.sql.BLOB contains one method getBytes(long pos, int length).
Class java.sql.CLOB contains one method getSubString(long pos, int length).
Here is my question : When I use these 2 methods, does the JDBC driver download the entire BLOB/CLOB in memory to execute the getXXX()?
It is important if BLOB/CLOB are very big... I just want to show an extract to the user. So, I don't want the driver download the entire BLOB/CLOB in memory... For example, with a getSubString(1,2) Imagine if JDBC download the entire CLOB (maybe 4-5Mo and more!) to extract only 2 characters...
I think it work like this (buffer?...) But I'm not sure so if someone can confirm...
Thanks