1.base64转byte[]

导包:

import java.util.Base64

转换:

String base64Str = base64的字符串;
byte[] bytes = Base64.getDecoder().decode(base64Str.trim());

2.byte[]转base64

Byte[] srcBytes = 字节数组
Base64.getEncoder().encodeToString(srcBytes)

     

相关文章:

  • 2021-12-20
  • 2022-01-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案