java110-utils/src/main/java/com/java110/utils/util/Base64Convert.java
@@ -36,7 +36,25 @@ } /** * 流转换为字符串 * * @param bytes * @return * @throws IOException */ public static String byteToBase64(byte[] bytes) { String strBase64 = null; // in.available()返回文件的字节长度 strBase64 = new BASE64Encoder().encode(bytes); //将字节流数组转换为字符串 return strBase64; } /** * 将base64 转为字节 * * @param strBase64 * @return * @throws IOException