Java Path to URL getURLPath(URI uri)

Here you can find the source of getURLPath(URI uri)

Description

get URL Path

License

LGPL

Declaration

public static String getURLPath(URI uri) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.net.URI;

public class Main {
    public static String getURLPath(URI uri) {
        if (uri.getScheme().equals("module")) {
            return "modules/" + uri.getAuthority() + uri.getPath();
        } else {//from ww w.  ja va2  s  .  co m
            return uri.getPath().substring(1);
        }
    }
}

Related

  1. getUrlForLocalPath(String path)
  2. getURLFromClassPath(String source)
  3. getURLFromPath(String jarPath)
  4. getUrlFromPath(String path)
  5. getUrlFromUrlPath(String path)
  6. getURLPath(URL repositoryURL)
  7. getURLPath(URL url)
  8. getUrlPath(URL url)
  9. getUrlPath(URL url)