URI: toURL()


import java.io.File;
import java.io.InputStream;
import java.net.URI;

public class Main {
  public static void main(String[] argv) throws Exception {
    File file = new File("filename");

    URI uri = file.toURI();
    file = new File(uri.toURL().getFile());
    InputStream is = uri.toURL().openStream();
    is.close();
  }
}
Home 
  Java Book 
    Networking  

URI:
  1. The URI Class
  2. URI: toURL()