public URI toURI(){
  String name=getAbsoluteName();
  try {
    if (!name.startsWith("/")) {
      return new URI("file",null,"/" + name,null,null);
    }
 else     if (name.startsWith("//")) {
      return new URI("file","",name,null);
    }
    return new URI("file",null,name,null,null);
  }
 catch (  URISyntaxException e) {
    return null;
  }
}

public URI toURI ( ) { String name = getAbsoluteName ( ) ; try { if ( ! name . startsWith ( "/" ) ) { return new URI ( "file" , null , "/" + name , null , null ) ; } else if ( name . startsWith ( "//" ) ) { return new URI ( "file" , "" , name , null ) ; } return new URI ( "file" , null , name , null , null ) ; } catch ( URISyntaxException e ) { return null ; } }
returns a uniform resource identifier for this file . the uri is system dependent and may not be transferable between different operating / file systems .
