Package org.aksw.commons.io.util
Class UriToPathUtils
java.lang.Object
org.aksw.commons.io.util.UriToPathUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringjavaifyHostname(String hostName) static String[]javaifyHostnameSegments(String hostName) Convert a host name to a java package name.static PathresolvePath(String uri) Deprecated.static PathresolvePath(URI uri) Deprecated.static String[]toPathSegments(String uri) static String[]toPathSegments(URI uri)
-
Constructor Details
-
UriToPathUtils
public UriToPathUtils()
-
-
Method Details
-
toPathSegments
-
toPathSegments
-
javaifyHostnameSegments
Convert a host name to a java package name. Splits the given argument string by '.', then reverses the order and joins the strings using '/'. For example, subdomain.example.org becomes org/example/subdomain- Parameters:
hostName-- Returns:
-
javaifyHostname
-
resolvePath
Deprecated.Default mapping of URIs to relative paths The scheme is omitted. scheme://host:port/path?query becomes host/port/path/query- Parameters:
uri-- Returns:
-
resolvePath
Deprecated.Attempt to parse the argument as a URI and convert it to aPath. If parsing as URI fails for any reason then the result is the URL encoded argument instead.- Parameters:
uri-- Returns:
-