文件的操作总是记不住,每次在写之前都要去查看以前的代码,记在这里方便查找
下面是使用BufferReader读取文件
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(filepath), "UTF-8"));
br.readerLine();
使用OutputStream写入到指定fileDir目录下的fileName.txt文件中
OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(new File(fileDir,"fileName.txt")),"UTF-8");
osw.writer(String )