title: Java buffered writer wont write all data
body: <pre><code>public static void save() 
  {
      BufferedWriter out = null;
      try 
      {
          out = new BufferedWriter(new OutputStreamWriter(Gdx.files.external(file).write(false)));
          out.write(Double.toString(FinanceSystem.currentPlayerCash));
          out.write("\n");
          out.write(Integer.toString(DateSystem.day));
          out.write("\n");
          out.write(Integer.toString(DateSystem.month));
          out.write("\n");
          out.write(Integer.toString(DateSystem.year));
          out.write("\n");
          for(int i = 0; i &lt;= InventorySystem.drugsOwned.size(); i++)
              out.write(Integer.toString(InventorySystem.drugsOwned.get(i))+"\n");
          for(int i = 0; i &lt;= AttributeSystem.attributeNames.length; i++)
              out.write(Integer.toString(AttributeSystem.attributeValues.get(i)) + "\n");
  
  
  
      } 
      catch (Throwable e) {} 
      finally 
      {
         try
         {
            if (out != null)
                 out.close();
         } 
         catch (IOException e) {}
      }
  </code></pre>
  
  <p>My problem is that after the for loop for the inventory system.drugsowned nothing else gets wrote to file. So in this example AttributeSystem.attributeValues doesnt get wrote.  I have also tried putting other things to be wrote after this loop including non loop things and they also haven't wrote. Whagwaan?</p>