List of utility methods to do URL Encode
String | encode(String value) encode String encoded = ""; try { encoded = URLEncoder.encode(value, "UTF-8"); } catch (UnsupportedEncodingException ignore) { StringBuffer buf = new StringBuffer(encoded.length()); char focus; for (int i = 0; i < encoded.length(); i++) { ... |
String | encodeURI(String encoded) encode URI encoded = encoded.replace("(", "%28"); encoded = encoded.replace(")", "%29"); encoded = encoded.replace("!", "%21"); encoded = encoded.replace("\'", "%27"); encoded = encoded.replace("*", "%2A"); return encoded; |
String | encode(String base) encode String encoded = Uri.encode(base);
return encodeURI(encoded);
|
String | encode(String url) encode return URLEncoder.encode(url);
|
String | urlEncode(String url) url Encode if (url == null) return null; try { return URLEncoder.encode(url, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return ""; |
String | encodeURL(String value) encode URL if (!isEmpty(value)) { return URLEncoder.encode(value, "UTF-8"); return ""; |
String | urlEncode(String string) url Encode return URLEncoder.encode(string, UTF8_ENCODING).replace("+", "%20"); |
String | getURLEncodeStr(String url) get URL Encode Str try { url = URLEncoder.encode(url, "utf-8"); } catch (UnsupportedEncodingException e) { return url; |
String | getUrlCode(String pageUrl) get Url Code try { String temp = getBaseUrl(pageUrl); temp = temp.substring(temp.indexOf("://") + 3).replace(".", "") .replace("/", ""); return temp; } catch (Exception e) { return null; ... |
String | urlEncode(String in) url Encode return URLEncoder.encode(in);
|