类 CharsetConvert
java.lang.Object
com.alibaba.druid.filter.encoding.CharsetConvert
字符编码转换器
- 作者:
- xianmao.hexm 2007-3-5 09:51:33
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Decodes the specified string using the specified server and client encodings, if enabled.Encodes the specified string using the specified client and server encodings, if enabled.booleanDetermines whether the specified string is null or empty.
-
构造器详细资料
-
CharsetConvert
-
-
方法详细资料
-
encode
Encodes the specified string using the specified client and server encodings, if enabled. If encoding is not enabled or the input string is empty, the original string is returned unchanged.- 参数:
s- the string to be encoded- 返回:
- the encoded string, or the original string if encoding is not enabled or the input string is empty
- 抛出:
UnsupportedEncodingException- if the specified encoding is not supported
-
decode
Decodes the specified string using the specified server and client encodings, if enabled. If decoding is not enabled or the input string is empty, the original string is returned unchanged.- 参数:
s- the string to be decoded- 返回:
- the decoded string, or the original string if decoding is not enabled or the input string is empty
- 抛出:
UnsupportedEncodingException- if the specified encoding is not supported
-
isEmpty
Determines whether the specified string is null or empty.- 参数:
s- the string to be checked- 返回:
- true if the specified string is null or empty, false otherwise
-