62,634
社区成员




/**
* BASE标准解码
*
* @author lz
* @param buff
* @return
*/
public static String decodeBase64(String str) {
return str == null ? null : StringUtils.newStringUtf8(base64.decode(str));
}
/**
* BASE64 编码
*
* @param s
* @return
*/
public static String encodeBufferBase64(byte[] buff) {
return buff == null ? null : encoder.encodeBuffer(buff).trim();
}
/**
* Encodes this {@code String} into a sequence of bytes using the
* platform's default charset, storing the result into a new byte array.
*
* <p> The behavior of this method when this string cannot be encoded in
* the default charset is unspecified. The {@link
* java.nio.charset.CharsetEncoder} class should be used when more control
* over the encoding process is required.
*
* @return The resultant byte array
*
* @since JDK1.1
*/
public byte[] getBytes() {
return StringCoding.encode(value, offset, count);
}