Base64 二进制

base64 常用与处理二进制文件数据流,做文本

byte[] bytes = FileUtil.readBytes(file); //  二进制i读取为字节数组
String content = Base64.getEncoder().encodeToString(bytes); // 字节数组按照base64编码格式转为字符串
posted @ 2024-03-22 15:05  SpecialSpeculator  阅读(7)  评论(0编辑  收藏  举报