Package com.logicaldoc.util.http
Class UrlUtil
- java.lang.Object
 - 
- com.logicaldoc.util.http.UrlUtil
 
 
- 
public class UrlUtil extends Object
Utility methods for handling URLs- Since:
 - 7.5.2
 - Author:
 - Marco Meschieri - LogicalDOC
 
 
- 
- 
Constructor Summary
Constructors Constructor Description UrlUtil() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringencode(String s, String enc)Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme.static Map<String,String>getParams(String urlString)static Map<String,List<String>>getQueryParams(String url) 
 - 
 
- 
- 
Method Detail
- 
getParams
public static Map<String,String> getParams(String urlString) throws UnsupportedEncodingException, MalformedURLException
 
- 
encode
public static String encode(String s, String enc) throws UnsupportedEncodingException
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
 
 - 
 
 -