字节流写出中文。
时间:2020-06-17 23:11:39
收藏:0
阅读:74
FileOutputStream fos = new FileOutputStream ("zzz.txt");
fos.write("我读书少,你不要骗我".getBytes()); //将字符串转换为字节数组,然后写出
fos.write("\r\n"getBytes()); //换到下一行
fos.write("我读书少,你知道吗".getBytes()); // 在第二行显示
fos.close();
原文:https://www.cnblogs.com/wangffeng293/p/13154939.html
评论(0)