Base64处理byte[ ]和base64字符串之间的转换
来源:互联网 发布:热门的数据库研究方向 编辑:程序博客网 时间:2024/05/18 15:27
1、工具类
2、普通String和byte[]转换
3、在线转换工具
http://www.vgot.net/test/image2base64.php?
import org.apache.commons.codec.binary.Base64;public class UtilHelper {//base64字符串转byte[]public static byte[] base64String2ByteFun(String base64Str){return Base64.decodeBase64(base64Str);}//byte[]转base64public static String byte2Base64StringFun(byte[] b){return Base64.encodeBase64String(b);}}
2、普通String和byte[]转换
public static void main(String[] args) {String str="我是中国人";byte[] arr=str.getBytes();System.out.println("打印:"+arr);String str2=new String(arr);System.out.println("打印2:"+str2);}
3、在线转换工具
http://www.vgot.net/test/image2base64.php?
0 2
- Base64处理byte[ ]和base64字符串之间的转换
- Byte[]和BASE64之间的转换
- Byte[]和BASE64之间的转换
- Java之Base64实现文件和字符串之间的转换
- java 实现 :Base64字符串 和 图片 之间的相互转换
- java BASE64与字符串之间的转换
- base64操作照片字符串之间的转换
- base64字符串与图片之间的转换
- base64和byte[]相互转换
- Bitmap和Base64之间的转换以及Base64 encode
- 【Android】Bitmap、InputStream、Drawable、byte[]、Base64之间的相互转换
- android bitmap和base64之间的转换
- android bitmap和base64之间的转换
- android bitmap和base64之间的转换
- android bitmap和base64之间的转换
- android bitmap和base64之间的转换
- android bitmap和base64之间的转换
- android bitmap和base64之间的转换
- 枚举类、内部类
- Spring boot 项目相关
- linux ttl线连接树莓派(演示的为rp3,硬件篇)
- linux虚拟机(红帽Red Hat6.4)安装mysql5.1x86_64简易教程!
- JavaBean和表单处理
- Base64处理byte[ ]和base64字符串之间的转换
- 选择排序
- File--各种文件操作
- Python文件操作,open读写文件,追加文本内容
- IT 界求职分析
- eclipse pull提示the current branch is not configured for pull
- https相关、http相关
- HOG 特征的提取--基于scikit-image
- 引用包里面的工具类