title: Simple way to convert a URL into a filename
body: <p>I'm writing an asynchronous image downloader for Android and was just wondering, given an arbitary URL such as:</p>
  
  <blockquote>
    <p><a href="http://www.android.com/images/brand/droid.gif" rel="noreferrer">http://www.android.com/images/brand/droid.gif</a></p>
  </blockquote>
  
  <p>What would be the best way to convert the unique url to a filename. I thought about simply splitting the url and grabbing the last section, but I want the filename to be representative of the whole URL. The other alternatives I thought were replacing all the forward slashes with underscores or simply hashing the whole URL and storing this.</p>
  
  <p>If anyone has any ideas I'd love to hear them!</p>
  
  <p>Thanks</p>