字节数组转为base64字符串
public String byteToBase64(byte[] b){
String image=Base64.getEncoder().encodeToString(b);
return image;
}
base64字符串转为字节数组
public byte[] base64ToByte(String base64str){
return Base64.getDecoder().decode(base64);
}
字节数组转为base64字符串
public String byteToBase64(byte[] b){
String image=Base64.getEncoder().encodeToString(b);
return image;
}
base64字符串转为字节数组
public byte[] base64ToByte(String base64str){
return Base64.getDecoder().decode(base64);
}