java 写文件
时间:2021-11-10 作者:匿名
try{ String fileName = "域名";//指定文件名 File file = new File(fileName); FileOutputStream out = new FileOutputStream(file);//建立输出流 byte[] b = new byte[1024]; String str = "Nice to see you again!"; b = 域名ytes();//String转化为byte[] 域名e(b);//写入文本内容 } catch(IOException e){ 域名tln(域名ring()); }