@Test public void testDecode() { assertEquals("/aaa", UrlUtil.decode("/aaa")); assertEquals("/aaa?", UrlUtil.decode("/aaa?")); assertEquals("/aaa?b", UrlUtil.decode("/aaa?b")); assertEquals("/aaa?b=", UrlUtil.decode("/aaa?b=")); assertEquals("/aaa?b=c", UrlUtil.decode("/aaa?b=c")); assertEquals("/aaa?b= c", UrlUtil.decode("/aaa?b=%20c")); assertEquals("/aaa?b= c&", UrlUtil.decode("/aaa?b=%20c&")); assertEquals("/aaa?b= c&dd", UrlUtil.decode("/aaa?b=%20c&dd")); assertEquals("/aaa?b= c&dd=", UrlUtil.decode("/aaa?b=%20c&dd=")); assertEquals("/aaa?b= c&dd==", UrlUtil.decode("/aaa?b=%20%20c&dd==")); assertEquals("?data=The string ü@foo-bar", UrlUtil.decode("?data=The%20string%20%C3%BC@foo-bar")); }
public static String decode(String url) { return decode(url, Opslab.UTF_8, false); }
UrlUtil { public static String decode(String url) { return decode(url, Opslab.UTF_8, false); } }
UrlUtil { public static String decode(String url) { return decode(url, Opslab.UTF_8, false); }  }
UrlUtil { public static String decode(String url) { return decode(url, Opslab.UTF_8, false); }  static String encodeScheme(String scheme, String encoding); static String encodeScheme(String scheme); static String encodeUserInfo(String userInfo, String encoding); static String encodeUserInfo(String userInfo); static String encodeHost(String host, String encoding); static String encodeHost(String host); static String encodePort(String port, String encoding); static String encodePort(String port); static String encodePath(String path, String encoding); static String encodePath(String path); static String encodePathSegment(String segment, String encoding); static String encodePathSegment(String segment); static String encodeQuery(String query, String encoding); static String encodeQuery(String query); static String encodeQueryParam(String queryParam, String encoding); static String encodeQueryParam(String queryParam); static String encodeFragment(String fragment, String encoding); static String encodeFragment(String fragment); static String encode(String uri); static String encode(String uri, String encoding); static String encodeHttpUrl(String httpUrl); static String encodeHttpUrl(String httpUrl, String encoding); static Builder build(String path); static Builder build(String path, boolean encodePath); static String decode(String url); static String decode(String source, String encoding); static String decodeQuery(String source); static String decodeQuery(String source, String encoding); final static String setParam(String url, String paramName, String paramValue); static final String getParamValue(String url, String paramName); static final String removeParam(String url, String... paramNames); static final String removeParam(String url, String paramName); static String urlJoin(URL url, String locationHeader); static Map print(HttpServletRequest request); static Map<String, String> parseQuery(String query, char split1, char split2, String dupLink); static Map<String, String> httpParseQuery(String queryUri); }
UrlUtil { public static String decode(String url) { return decode(url, Opslab.UTF_8, false); }  static String encodeScheme(String scheme, String encoding); static String encodeScheme(String scheme); static String encodeUserInfo(String userInfo, String encoding); static String encodeUserInfo(String userInfo); static String encodeHost(String host, String encoding); static String encodeHost(String host); static String encodePort(String port, String encoding); static String encodePort(String port); static String encodePath(String path, String encoding); static String encodePath(String path); static String encodePathSegment(String segment, String encoding); static String encodePathSegment(String segment); static String encodeQuery(String query, String encoding); static String encodeQuery(String query); static String encodeQueryParam(String queryParam, String encoding); static String encodeQueryParam(String queryParam); static String encodeFragment(String fragment, String encoding); static String encodeFragment(String fragment); static String encode(String uri); static String encode(String uri, String encoding); static String encodeHttpUrl(String httpUrl); static String encodeHttpUrl(String httpUrl, String encoding); static Builder build(String path); static Builder build(String path, boolean encodePath); static String decode(String url); static String decode(String source, String encoding); static String decodeQuery(String source); static String decodeQuery(String source, String encoding); final static String setParam(String url, String paramName, String paramValue); static final String getParamValue(String url, String paramName); static final String removeParam(String url, String... paramNames); static final String removeParam(String url, String paramName); static String urlJoin(URL url, String locationHeader); static Map print(HttpServletRequest request); static Map<String, String> parseQuery(String query, char split1, char split2, String dupLink); static Map<String, String> httpParseQuery(String queryUri);  }