title: Play framework 2.0.4 file download
body: <p>I'm having trouble sending a file to the browser from play to initiate a download. At the moment this is what I am doing:</p>
  
  <pre><code>File sitemap = new File(output);
  
  response().setHeader("Cache-Control", "public");
  response().setHeader("Content-Description", "File Transfer");
  response().setHeader("Content-Disposition", "attachment; filename=download.xml");
  response().setHeader("Content-Type",  "mime/type");
  response().setHeader("Content-Transfer-Encoding", "binary");
  
  return ok(new FileInputStream(sitemap)).as("application/xml");
  </code></pre>
  
  <p>All this does is print the contents of the file to the console. I have tried this and get the same result:</p>
  
  <pre><code>return ok(sitemap);
  </code></pre>
  
  <p>Anyone have any ideas what I'm doing wrong here?</p>