Guest User

Untitled

a guest
May 27th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public static void main(String[] args) {
  2. try {
  3. System.out.println(new File("C:\test a.xml").toURI().toURL());
  4. } catch (Exception e) {
  5. e.printStackTrace();
  6. }
  7. }
  8.  
  9. result.append(":");
  10. if (u.getAuthority() != null && u.getAuthority().length() > 0) {
  11. result.append("//");
  12. result.append(u.getAuthority());
  13. }
  14.  
  15. <scheme>:<scheme-specific-part>
  16.  
  17. URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
  18.  
  19. hier-part = "//" authority path-abempty
  20. / path-absolute
  21. / path-rootless
  22. / path-empty
Add Comment
Please, Sign In to add comment