类 EscapeUtil
java.lang.Object
com.jeeplus.devtools.util.EscapeUtil
转义工具集.
1.JDK提供的URL 转义,转义后的URL可作为URL中的参数
2.Commons-Lang的xml/html 转义
比如 "bread" & "butter" 转化为 "bread" & "butter"
- 作者:
- calvin
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringescapeHtml(String html) Html转码,将字符串转码为符合HTML4格式的字符串.static StringXml转码,将字符串转码为符合XML1.1格式的字符串.static StringunescapeHtml(String html) Html解码,将HTML4格式的字符串转码解码为普通字符串.static StringunescapeXml(String xml) Xml转码,XML格式的字符串解码为普通字符串.static StringURL 解码, Encode默认为UTF-8.static StringURL 编码, Encode默认为UTF-8.
-
构造器详细资料
-
EscapeUtil
public EscapeUtil()
-
-
方法详细资料
-
urlEncode
URL 编码, Encode默认为UTF-8.转义后的URL可作为URL中的参数
-
urlDecode
URL 解码, Encode默认为UTF-8. 转义后的URL可作为URL中的参数 -
escapeXml
Xml转码,将字符串转码为符合XML1.1格式的字符串.比如 "bread" & "butter" 转化为 "bread" & "butter"
-
unescapeXml
Xml转码,XML格式的字符串解码为普通字符串.比如 "bread" & "butter" 转化为"bread" & "butter"
-
escapeHtml
Html转码,将字符串转码为符合HTML4格式的字符串.比如 "bread" & "butter" 转化为 "bread" & "butter"
-
unescapeHtml
Html解码,将HTML4格式的字符串转码解码为普通字符串.比如 "bread" & "butter"转化为"bread" & "butter"
-