java 如何将字节数组对应的数据转换成字符

2025-05-14 20:57:39
推荐回答(1个)
回答1:

Strint str = new String(bytes); //.java 文件默认的编码

Strint str = new String(bytes, "utf-8"); //unicode 2位

Strint str = new String(bytes, "gbk"); //中文简体