scala 字节数组转为字符串再转回字节数组

直接用Array[Byte].toString() 然后 String.getBytes() 会有问题

应该用:

str = Base64.getEncoder.encodeToString(arr)

arr = Base64.getDecoder.decode(str)

原文地址:https://www.cnblogs.com/zealousness/p/15103565.html