2 qq 40053658 qq_40053658 于 2017.08.31 22:55 提问

从一个文件中获得一个字符流

1.利用FileWriter类
2.利用PrintWriter类
3.利用fileoutputstream类,并通过outputstreamwriter类获得writer

1个回答

zy841958835
zy841958835   Ds   Rxr 2017.09.01 09:19

FileWriter fw = new FileWriter(new File("c:\a.txt"));
PrintWriter pw = new PrintWriter(fw);
fileoutputstream fos = new FileOutputStream(“newPoem.txt”);
OutputStreamWriter osw = new OutputStreamWriter(fos,”UTF-8″);

Csdn user default icon
上传中...
上传图片
插入图片