Class URLParserUtil
- java.lang.Object
-
- org.gcube.application.geoportalcommon.util.URLParserUtil
-
public class URLParserUtil extends Object
The Class URLUtil.- Author:
- Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) Oct 29, 2020
-
-
Constructor Summary
Constructors Constructor Description URLParserUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringaddParameterToQueryString(String key, String value, boolean prefixAmpersand, boolean suffixAmpersand)Adds the parameter to query string.static StringextractValueOfParameterFromURL(String paramName, String url)Extract value of parameter from URL.static Map<String,List<String>>splitQuery(URL url)Split query.
-
-
-
Method Detail
-
addParameterToQueryString
public static String addParameterToQueryString(String key, String value, boolean prefixAmpersand, boolean suffixAmpersand)
Adds the parameter to query string.- Parameters:
key- the keyvalue- the valueprefixAmpersand- the prefix ampersandsuffixAmpersand- the suffix ampersand- Returns:
- the string
-
extractValueOfParameterFromURL
public static String extractValueOfParameterFromURL(String paramName, String url)
Extract value of parameter from URL.- Parameters:
paramName- the param nameurl- the url- Returns:
- the string
-
splitQuery
public static Map<String,List<String>> splitQuery(URL url) throws UnsupportedEncodingException
Split query.- Parameters:
url- the url- Returns:
- the map
- Throws:
UnsupportedEncodingException- the unsupported encoding exception
-
-