比如:
byte[] bytes = new byte[] { 84, 80, 45, -42, -36, -79, -33, 49, 50, 51, 97, 98, 99 };
通过String utf = new String(bytes, "UTF-8");后获得一个字符串:utf。现在我怎么根据这个字符串utf获取bytes这个字节数组呢?
比如:
byte[] bytes = new byte[] { 84, 80, 45, -42, -36, -79, -33, 49, 50, 51, 97, 98, 99 };
通过String utf = new String(bytes, "UTF-8");后获得一个字符串:utf。现在我怎么根据这个字符串utf获取bytes这个字节数组呢?