title: The efficient way of reading/writing hundred thousands of lines from a file
body: <p>This question has been asked a couple of times and I have seen the solutions. However, before I start reading the file, I have also the option of finding a good way of writing in to the file so that reading/accessing the file will be easy and efficient.</p>
  
  <p>The file should contain hundred thousands of lines each line containing 5-9 items in a row. Like name, ssn, and others. The way I planned to store those items in to the file is by using a delimiter (like comma) so accessing will be as simple as finding the the location of the comma and read till the next comma. Do you think that is a good (efficient)way of reading/writing to a file? </p>
  
  <p>The next task after reading is to store those (5-9 )  items in to a map (a Java map). </p>
  
  <p>Is my way of writing/reading simple and efficient (when I say efficient ... imagine I am going to read a file which might contain hundred thousands of lines each line having up to 9 different items ) ? Should I use pattern/marcher for writing and reading each line?</p>
  
  <p>Any of your opinions will also be appreciated. Thank you. </p>
  
  <p><strong>EDIT:</strong>  We are migrating a data from mainframe to a web based system (which actually uses Oracle). However we need to get the data from the mainframe, process it and tweak some objects before saving to the new database. So my problem lies in the middle of getting the data from the main frame and put it in to the database.</p>