title: how to find the path of file created using FileOutputStream
body: <p>I created a file using FileOutputStream and it is an excel file (using HSSF Liberary) </p>
  
  <pre><code>FileOutputStream fileOut = new FileOutputStream(text+".xls");
  </code></pre>
  
  <p>then I write what I need in my excel file (workbook) and then close the file</p>
  
  <pre><code>workbook.write(fileOut);
  fileOut.flush();
  fileOut.close();
  </code></pre>
  
  <p>After closing it I need to display the path of the file to user, (I know that it creates in the folder of my application but I still need to display it to user, maybe via joption/message box)</p>
  
  <p>I tried this : </p>
  
  <pre><code>String absolutePath = fileOut.getAbsolutePath();
  JOptionPane.showMessageDialog(null, absolutePath);
  </code></pre>
  
  <p>but it shows error and it says that it cannot find the method "getAbsolutePath". what should I do ? is there anyway that I can get this path ?</p>