title: java i/o read in multi line file and store as arraylist
body: <p>I want to read in a simple text file and save it as an ArrayList. The file looks like so</p>
  
  <pre><code>0.2253 
  0.808 
  0.132 
  0.341 
  
  4.18546
  8.65418
  1.45535
  0.341
  
  and so on...
  </code></pre>
  
  <p>They will always be four lines and they will always be delimited by a blank space. Somehow I'd like to use that as the break point to begin the new array and pick back up with the first new number as index zero. </p>
  
  <p>The numbers must be stored as strings. </p>
  
  <p>I want to assign this data to an ArrayList such that </p>
  
  <pre><code>[0][0] = 0.2253
  [0][1] = 0.808
  [0][2] = 0.132
  [0][3] = 0.341
  
  [1][0] = 4.18546
  [1][1] = 8.65418
  [1][2] = 1.45535
  [1][3] = 0.341
  </code></pre>
  
  <p>how can I do this using the structures of java i/o?</p>
  
  <p>java io arraylist </p>
  
  <p>So far I have this.. </p>
  
  <pre><code>    //array list data struc
      ArrayList&lt;String&gt; array_list = new ArrayList&lt;String&gt;();
  
      String component_doc = "/home/joao/document.txt"
  
      Scanner inFile = null;
      try 
      {
          inFile = new Scanner(new File(component_doc));
      } 
      catch (FileNotFoundException e) 
      {
          e.printStackTrace();
      }
  
      while(inFile.hasNextLine())
      {
          array_list.add(inFile.nextLine());
      }
  </code></pre>