title: how to create a org.primefaces.model.UploadedFile out of a org.apache.commons.io.output.ByteArrayOutputStream
body: <p>I've been searching the web but cannot find any example.</p>
  
  <p>Having one instance of: </p>
  
  <pre><code>org.apache.commons.io.output.ByteArrayOutputStream
  </code></pre>
  
  <p>How can i obtain one instance of:</p>
  
  <pre><code>org.primefaces.model.UploadedFile
  </code></pre>
  
  <p>Thanks</p>