程序包 dev.utils.common
类 EncodeUtils
java.lang.Object
dev.utils.common.EncodeUtils
detail: 编码工具类
- 作者:
- Ttt
Base64 flags CRLF 这个参数看起来比较眼熟, 它就是 Win 风格的换行符, 意思就是使用 CR LF 这一对作为一行的结尾而不是 Unix 风格的 LF DEFAULT 这个参数是默认, 使用默认的方法来加密 NO_PADDING 这个参数是略去加密字符串最后的 = NO_WRAP 这个参数意思是略去所有的换行符 ( 设置后 CRLF 就没用了 ) URL_SAFE 这个参数意思是加密时不使用对 URL 和文件名有特殊意义的字符来作为加密字符, 具体就是以 - 和 _ 取代 + 和 /
-
方法概要
修饰符和类型方法说明static byte[]base64Decode(byte[] input) Base64 解码static byte[]base64Decode(byte[] input, int flags) Base64 解码static byte[]base64Decode(String input) Base64 解码static byte[]base64Decode(String input, int flags) Base64 解码static Stringbase64DecodeToString(byte[] input) Base64 解码static Stringbase64DecodeToString(byte[] input, int flags) Base64 解码static Stringbase64DecodeToString(String input) Base64 解码static Stringbase64DecodeToString(String input, int flags) Base64 解码static byte[]base64Encode(byte[] input) Base64 编码static byte[]base64Encode(byte[] input, int flags) Base64 编码static byte[]base64Encode(String input) Base64 编码static byte[]base64Encode(String input, int flags) Base64 编码static Stringbase64EncodeToString(byte[] input) Base64 编码static Stringbase64EncodeToString(byte[] input, int flags) Base64 编码static Stringbase64EncodeToString(String input) Base64 编码static Stringbase64EncodeToString(String input, int flags) Base64 编码static StringhtmlEncode(CharSequence input) Html 字符串编码
-
方法详细资料
-
base64Encode
Base64 编码- 参数:
input- 待处理数据- 返回:
- Base64 编码后的 byte[]
-
base64Encode
Base64 编码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 编码后的 byte[]
-
base64Encode
public static byte[] base64Encode(byte[] input) Base64 编码- 参数:
input- 待处理数据- 返回:
- Base64 编码后的 byte[]
-
base64Encode
public static byte[] base64Encode(byte[] input, int flags) Base64 编码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 编码后的 byte[]
-
base64EncodeToString
Base64 编码- 参数:
input- 待处理数据- 返回:
- Base64 编码后的 byte[] 转 String
-
base64EncodeToString
Base64 编码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 编码后的 byte[] 转 String
-
base64EncodeToString
Base64 编码- 参数:
input- 待处理数据- 返回:
- Base64 编码后的 byte[] 转 String
-
base64EncodeToString
Base64 编码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 编码后的 byte[] 转 String
-
base64Decode
Base64 解码- 参数:
input- 待处理数据- 返回:
- Base64 解码后的 byte[]
-
base64Decode
Base64 解码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 解码后的 byte[]
-
base64Decode
public static byte[] base64Decode(byte[] input) Base64 解码- 参数:
input- 待处理数据- 返回:
- Base64 解码后的 byte[]
-
base64Decode
public static byte[] base64Decode(byte[] input, int flags) Base64 解码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 解码后的 byte[]
-
base64DecodeToString
Base64 解码- 参数:
input- 待处理数据- 返回:
- Base64 解码后的 byte[] 转 String
-
base64DecodeToString
Base64 解码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 解码后的 byte[] 转 String
-
base64DecodeToString
Base64 解码- 参数:
input- 待处理数据- 返回:
- Base64 解码后的 byte[] 转 String
-
base64DecodeToString
Base64 解码- 参数:
input- 待处理数据flags- Base64 编解码 flags- 返回:
- Base64 解码后的 byte[] 转 String
-
htmlEncode
Html 字符串编码- 参数:
input- 待处理数据- 返回:
- Html 编码后的数据
-