标签:bsp [] 传输 byte utf-8 gbk 字节 bytes get
网络以字节码传输
String s = "我恨你";
//转成字节:
byte[] brr = s.getBytes();//gbk
//iE:utf-8
String s1 = new String(brr);
brr = s1.getBytes("utf-8");//中:97 98 99
//你
String s2 =new String(brr,"utf-8");//gbk:97 98
System.out.println(s2);
标签:bsp [] 传输 byte utf-8 gbk 字节 bytes get
原文地址:http://www.cnblogs.com/monion/p/7049711.html