程序包 com.ajaxjs.util
类 Base64Utils
java.lang.Object
com.ajaxjs.util.Base64Utils
Base64 encode/decode
-
构造器概要
构造器构造器说明Base64Utils(byte[] input) Base64Utils(String input) Base64Utils(String input, Charset charset) -
方法概要
修饰符和类型方法说明byte[]decode()Decode the input then returns the result in bytesDecode the input in BASE64 then returns the string in UTF-8 charsetdecodeAsString(Charset charset) Decode the input in BASE64 then returns the string with specified charsetbyte[]encode()Encode the input then returns the result in bytesDecode the input in BASE64 then returns the string.static StringformatBase64String(String base64) 格式化 Base64 字符串,每 64 个字符换行
-
构造器详细资料
-
Base64Utils
public Base64Utils(byte[] input) -
Base64Utils
-
Base64Utils
-
-
方法详细资料
-
encode
public byte[] encode()Encode the input then returns the result in bytes- 返回:
- The result in bytes.
-
encodeAsString
Decode the input in BASE64 then returns the string. Charset ISO_8859_1 is enough for BASE64 result.- 返回:
- The result in string.
-
decode
public byte[] decode()Decode the input then returns the result in bytes- 返回:
- The result in bytes.
-
decodeAsString
Decode the input in BASE64 then returns the string with specified charset- 参数:
charset- you can specify the charset of the result- 返回:
- The result in string.
-
decodeAsString
Decode the input in BASE64 then returns the string in UTF-8 charset- 返回:
- The result in string.
-
formatBase64String
格式化 Base64 字符串,每 64 个字符换行
-