title: Writing information to text file
body: <p>We have a problem with writing our ArrayList to a file. 
  The file remains empty. We don't find any mistake in our code.
  please help us, our deadline is within a few hours...</p>
  
  <pre><code>public void rapportAssortiment(String winkelNaam)   throws Exception 
      {
          ArrayList &lt;Artikel&gt; assortiment = db.rapportAssortiment(winkelNaam);
          PrintWriter outputStream = null;
          try
          {
              outputStream = new PrintWriter(new FileOutputStream("RapportAssortiment.txt",true));
              outputStream.println("Rapport van het assortiment van winkel " + winkelNaam);
              outputStream.println("Artikelnummer" + ";" + "Artikelnaam" + ";" + "Prijs" + ";" + "Aantal bonuspunten" + ";" + "Aantal bonuspunten nodig" + ";" + "Minimum aantal stuks" + ";" + "Minimum bedrag" + ";" );
              for(int i = 0; i&lt; assortiment.size(); i++)
              {
                  outputStream.println(assortiment.get(i).getArtikelNr() + ";" + assortiment.get(i).getArtikelNaam() + ";" + assortiment.get(i).getPrijs() + ";" + assortiment.get(i).getAantPunten() + ";" + assortiment.get(i).getAantPuntenNodig() + ";" + assortiment.get(i).getMinAantStuks() + ";" + assortiment.get(i).getMinBedrag() );
  
              }
          }
          catch(Exception exc)
          {
              System.out.println("Rapport trekken mislukt.");
          }
      }
  </code></pre>