title: How to send a newly created excel file in response without saving it on hard-disk?
body: <pre><code>    List&lt;String&gt; headerRow = Arrays.asList("col1", "col2", "col3","col4","col5"); 
      // Creates a xlsx workbook !!
      XSSFWorkbook wb = ExcelHelper.writeToXlsxExcelFile(headerRow,EjbHelper.getAccountEJb().getCustomersByscPartyNumber("9B7W5")); 
      //Creating a file to dump xlsx
      String fileLocation = "d://try.xlsx";
      FileOutputStream fout = new FileOutputStream(fileLocation);
      workbook.write(fout);
      //Want to Create a Webservice to send response without saving file to hard-disk 
      ResponseBuilder response = Response.ok((Object)fout);
      response.header("Content-Disposition","attachment; filename=" + "ResourceInformation.xlsx");
      return response.build();
  </code></pre>
  
  <p>Above code snippet creates a xlsx file and then sends it over response .I want to know is there any way of sending xlsx file directly without creating file on hard-disk?</p>