title: Convert Outputstream to file
body: <p>Well i'm stucked with a problem,</p>
  
  <p>I need to create a PDF with a html source and i did this way:</p>
  
  <pre><code>File pdf = new File("/home/wrk/relatorio.pdf");
  OutputStream out = new FileOutputStream(pdf);
  InputStream input = new ByteArrayInputStream(build.toString().getBytes());//Build is a StringBuilder obj
  Tidy tidy = new Tidy();
  Document doc = tidy.parseDOM(input, null);
  ITextRenderer renderer = new ITextRenderer();
  renderer.setDocument(doc, null);
  renderer.layout();
  renderer.createPDF(out);
  out.flush();
  out.close();
  </code></pre>
  
  <p>well i'm using JSP so i need to download this file to the user not write in the server...</p>
  
  <p>How do I transform this Outputstream output to a file in the java without write this file in hard drive ?</p>