title: Buffer Writer overriding at everyline
body: <p>I have set up a loop for a buffered writer to write an  array of strings into a file, seems simple enough right? Well for some reason, and I'm sure I'll feel stupid for missing it but it writes over the previous line of text at each iteration. </p>
  
  <p>The following is the loop</p>
  
  <pre><code>    for(int i = 0; listnames.length &gt; i; i++){
      String[] data = getItemsandAisles(listnames[i]);
      for(int x = 0; data.length &gt; x; x ++){
          BufferedWriter bw = new BufferedWriter(new FileWriter(listfile[i]));
          System.out.println("Writing " + data[x] + " to file " + listfile[i].getAbsolutePath());
          bw.write(data[x]);
          bw.flush();
          bw.newLine();
          bw.close();
      }
  }
  </code></pre>
  
  <p>This is the log cat for all of the outputs that I put in, this is just of the first iteration because it has the most items</p>
  
  <pre><code>Writing COFFEE CREAMERS 5 to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  Writing SAUCES APPLE CRANBERRY 6 to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  Writing COCOA 5 to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  Writing UMBRELLAS Front End Rack to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  Writing PET NEEDS 9A\/B to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  Writing ITALIAN CHEESE 17 to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  Writing EGGS Dairy to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  Writing BACON Meat to file /data/data/dev.shaw.MyShoppingPlanner/files/sample list.txt
  </code></pre>
  
  <p>and then the final output when I download the txt file from the device is just one line of</p>
  
  <pre><code>BACON Meat
  </code></pre>
  
  <p>This is what lead me to believe that it was not actually creating a new line. Any help would be greatly appreciated. I know that some-what similar questions are on here but I tried all of those solutions but they don't seem to solve the issue. </p>