Is there posibility to get buffered stream directly from db CLOB
data mapped in JPA
by String
field annotted by @Lob
. I want to read field line by line without getting all field to my service.
I'am using:
BufferedReader reader = new BufferedReader(new StringReader(entity.getField()));
Reading service begin transaction on start and after all task are done do commit. I'am not sure how it works. Is there whole field getted on reader conctructor to service memory or there is only handler to data in db?
Similar posibility is with JDBC
connection without JPA
and java.sql.ResultSet.getNCharacterStream(int columnIndex)
.