title: Get file URI in a certain way
body: <p>Is there a way to return file:/// through the <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html" rel="nofollow">File Api</a>. Right now, I have:</p>
  
  <pre><code>URL url = file.toURI().toURL();
  </code></pre>
  
  <p>The above code returns <code>file:/&lt;location&gt;</code> but I want it to return <code>file:///&lt;location&gt;</code>. The only way I can think of is <code>replace("file:/", "file:///")</code>. Is there a better way?</p>