1、字节数组转换为字符串
byte[] byBuffer = new byte[20];
... ...
String strRead = new String(byBuffer);
strRead=String.copyValueOf(strRead.toCharArray(), 0, byBuffer.length]);
2、字符串转换成字节数组
byte[] byBuffer = new byte[200];
String strInput="abcdefg";
byBuffer= strInput.getBytes();