Package com.logicaldoc.util.http
Class UrlUtil
java.lang.Object
com.logicaldoc.util.http.UrlUtil
Utility methods for handling URLs
- Since:
- 7.5.2
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme.static String
getQueryParam
(String url, String parameter) getQueryParams
(String url) static String
static URL
-
Method Details
-
getQueryParams
-
getParams
public static Map<String,String> getParams(String urlString) throws UnsupportedEncodingException, MalformedURLException, URISyntaxException -
getQueryParam
public static String getQueryParam(String url, String parameter) throws MalformedURLException, URISyntaxException -
encode
Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme. This method uses the supplied encoding scheme to obtain the bytes for unsafe characters.- Parameters:
s
- - String to be translated.enc
- - The name of a supported character encoding.- Returns:
- the translated String.
- Throws:
UnsupportedEncodingException
- - If the named encoding is not supported
-
normalize
-
toURL
-