String转化为byte[]数组
String str = "asd";
byte[] bs = str.getBytes();
byte[]数组转化为String字符串
byte[] arr = {1,2,3};
String s = new String(arr);
设置格式
byte[] arr = {1,2,3};
String res = new String(arr,"UTF-8");
String str = "asd";
byte[] bs = str.getBytes();
byte[] arr = {1,2,3};
String s = new String(arr);
byte[] arr = {1,2,3};
String res = new String(arr,"UTF-8");