title: Parsing CSV files to arrays from very large sources in java
body: <p>I have a parser that works fine on smaller files of approx. 60000 lines or less but I have to parse a CSV file with over 10 million lines and this method just isn't working it hangs every 100 thousand lines for 10 seconds and I assume its the split method, Is there a faster way to parse data from a CSV to a string array?</p>
  
  <p>Code in question:</p>
  
  <pre><code>    String[][] events = new String[rows][columns];
      Scanner sc = new Scanner(csvFileName);
  
      int j = 0;
      while (sc.hasNext()){
          events[j] = sc.nextLine().split(",");
          j++;
      }
  </code></pre>