public static void main(String[] args) throws IOException { //根据数据源创建字符缓冲输入流对象 BufferedReader br=new BufferedReader(new FileReader("e:\\java\\11\\123.java")); BufferedWriter bw=new BufferedWriter(new FileWriter("e:\\java\\11\\456.java")); String line; while((line= br.readLine())!=null){ bw.write(line); bw.newLine(); bw.flush(); } bw.close(); br.close(); }
字符缓冲流特有功能复制java文件
最新推荐文章于 2022-09-01 14:45:52 发布