导包:
import java.util.Base64
转换:
String base64Str = base64的字符串; byte[] bytes = Base64.getDecoder().decode(base64Str.trim());
Byte[] srcBytes = 字节数组 Base64.getEncoder().encodeToString(srcBytes)
Java中base64与byte[]转换
原文:https://www.cnblogs.com/zys2019/p/14377570.html