title: Is there a standard way to transform a String into a File considerning the possibility of a URL/URI formatted input String
body: <p>I would like to obtain the most accurate <code>File</code> typed representation of a String that is supposed to refer to a local (existing) file in one of several forms like:</p>
  
  <pre><code>String file0 = "/home/my_user/file.txt"
  
  String file1 = "file:///home/my_user/file.txt"
  
  String file2 = "file.txt"; // assuming that the working dir is /home/my_user.
  
  </code></pre>
  
  <p>Is there a (quasy) single liner using the standard library or perhaps a common third party like apache-commons that would do the trick?</p>
  
  <p>Thanks.</p>