title: How to return outputstream of .xlsx file
body: <p>in a java-class i just created workbook like this
   <code>XSSFWorkbook workbook = (XSSFWorkbook) WorkbookFactory.create(fis);</code>
  and filled cells with its corresponding celltype. 
  now i need to write it as a xxx.xlsx file same time return a BuyteArrayOutputStream.
  to do so,</p>
  
  <p><code>FileOutputStream fos = new FileOutputStream(tempFile);</code><br>
  <code>workbook.write(fos);</code></p>
  
  <p><code>ByteArrayOutputStream outputStream = new ByteArrayOutputStream();</code><br>
  <code>workbook.write(outputStream);</code><br>
  <code>return outputStream;</code></p>
  
  <p>here writing xxx.xlsx fils done successfully but same time it returns outputStream as null?
  How do achieve it both?</p>