程序包 com.ajaxjs.util
类 UrlEncode
java.lang.Object
com.ajaxjs.util.UrlEncode
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明decode()Do the url decodeencode()Do the url encode with specified charsetDo the url encode, best for GET requestDo the url encode TODO ToFixMe: fails in UnitTestparseStringToMap(String accessTokenStr) 字符串转 Map,格式为xxx=xxx&xxx=xxxstatic StringurlChinese(String str) URL 网址的中文乱码处理。
-
构造器详细资料
-
UrlEncode
Create a new UrlEncode with input string. It's a default constructor.- 参数:
input- The string input
-
UrlEncode
Create a new UrlEncode with input string and specified charset- 参数:
input- The string inputcharset- The charset of the input string
-
-
方法详细资料
-
encode
Do the url encode with specified charset- 返回:
- The string being URL encoded
-
encodeQuery
Do the url encode, best for GET request- 返回:
- The string being URL encoded
-
encodeSafe
Do the url encode TODO ToFixMe: fails in UnitTest- 返回:
- The string being URL encoded
-
decode
Do the url decode- 返回:
- The string being URL decode
-
urlChinese
URL 网址的中文乱码处理。 如果 Tomcat 过滤器设置了 UTF-8 那么这里就不用重复转码了- 参数:
str- 通常是 URL 的 Query String 参数- 返回:
- 中文
-
parseStringToMap
字符串转 Map,格式为xxx=xxx&xxx=xxx- 参数:
accessTokenStr- 待转换的字符串- 返回:
- map
-