摘要: 一、字符串转字节数组 String str = "金灿灿"; byte[] bytes = str.getBytes(); 如果转换的时候不设置编码格式,默认是以环境的字符集编码。 1.utf-8 : byte[] bytes = str.getBytes("utf-8");//中文是占三个字节 2 阅读全文
posted @ 2019-04-24 16:28 暗失一切 阅读(2576) 评论(0) 推荐(0) 编辑