title: Get download file name from URL or HttpUrlConnection?
body: <p>In downloading a file (Eclipse's win32 zip) from the following URL in Firefox, the filename is known to be <code>eclipse-jee-juno-SR1-win32.zip</code>.</p>
  
  <pre><code>http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR1/eclipse-jee-juno-SR1-win32.zip&amp;url=http://download.eclipse.org/technology/epp/downloads/release/juno/SR1/eclipse-jee-juno-SR1-win32.zip&amp;mirror_id=1
  </code></pre>
  
  <p>However, this file name is not specified in the <code>Content-disposition</code> header, which is the standard method of acquiring the server-suggested file name.</p>
  
  <p>Here, eclipse's download is simply an example.  I see that the file name is a part of the URL, but is there an alternative method to get the file name?  I could use regex to extract the file name from the URL in this case, but it isn't guaranteed to be a part of every URL without a Content-disposition header.</p>
  
  <p><strong>Question: How can the download's file name be acquired when no Content-disposition header is present?</strong> Or, more localized, how does Firefox come up with the aforementioned name?</p>
  
  <p><sub>Or is Firefox simply parsing the URL here, and I've come across a case where it simply happens to work despite extracting the file name from an indirect, script-delivered download?</sub></p>