java.lang.Object
org.seppiko.commons.utils.http.URIUtil
URI Util
[scheme ":"] ["//" authority] "/" path ["?" query] ["#" fragment]
authority = [userinfo "@"] host [":" port]
userinfo = username [":" password]
But the URI definition requires that the scheme must be used.
- Author:
- Leonard Woo
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
URIUtil
public URIUtil()
-
-
Method Details
-
getUri
get URI object- Parameters:
uri- URI address (like url)- Returns:
- URI object
- Throws:
NullPointerException- If uri string is nullIllegalArgumentException- If the given string violates RFC 2396
-
getLastPathname
public static String getLastPathname(String uri) throws IllegalArgumentException, NullPointerException Get last path name (e.g. filename)- Parameters:
uri- URI- Returns:
- last path content e.g. filename
- Throws:
IllegalArgumentException- uri is not legal URINullPointerException- uri is null
-