title: how to write huge data in text file using JDBC without running out of memory
body: <p>I am trying to create a dump file from a database using JDBC.  The file should be round about 300 mb in size containing 1.2 to 1.5 millions records across ten columns but I run out of memory at about 250 thousand.  </p>
  
  <p>My question is does java store the entire recordset in memory?  I have set the recordset to be readable only forward in the hope that records already dumped would be cleared from memory but it does not seem to be the case.  </p>
  
  <p>Any help would be greatly appreciated.</p>