title: java.lang.IndexOutOfBoundsException: Index: xx, Size: xx
body: <p>I am loading a .csv file with comma delimiter by using jdom parser to split the data and insert into database.</p>
  
  <p>but somehow I have hit this error as title mentioned. 
  the .csv file contains of over 200k of records.</p>
  
  <p>when it reads until around 4000 records , the program was thrown this error. 
  index and size are the same value but before that all the records can be inserted successfully. Just wondering why it goes until almost 4k only hit this error. </p>
  
  <p>this is my for loop :</p>
  
  <pre><code>for(int x = 0; x &lt; FLODS.getBufferSize(); x++)
  </code></pre>
  
  <p>But I did a search on internet : they are sugguesting this method..</p>
  
  <pre><code>for(int x = 0; x &lt; FLODS.getBufferSize()-1; x++)
  </code></pre>
  
  <p>Any idea? Thanks :) </p>