java字符串转换总结
1.byte[]转String
String str = new String(strByte);
2.String转byte[]
byte[] byteArr = str.getBytes();
3.char[]转成String
char []s = {'a','b','c'};
String str1 = new String(s);
String str2 = String.valueOf(s);
4.String转成char[]
String str = "abcdef";
char[] charStr = str.toCharArray();