Java Path to URL getUrlPath(URL url)

Here you can find the source of getUrlPath(URL url)

Description

get Url Path

License

LGPL

Declaration

private static String getUrlPath(URL url)
            throws UnsupportedEncodingException 

Method Source Code

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

import java.io.File;

import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;

public class Main {
    private static String getUrlPath(URL url)
            throws UnsupportedEncodingException {
        return (new File(URLDecoder.decode(url.getPath(), "UTF-8"))
                .getAbsolutePath() + File.separator);
    }//from ww  w .j a  v a 2 s .com
}

Related

  1. getUrlFromUrlPath(String path)
  2. getURLPath(URI uri)
  3. getURLPath(URL repositoryURL)
  4. getURLPath(URL url)
  5. getUrlPath(URL url)
  6. getURLPathFromURI(String uri)
  7. getURLPathFromURN(String urn)
  8. getURLs(List paths)
  9. getURLs(String thePaths[])