在劫

吾生也有涯,而知也无涯 。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::


	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		String pathWriter = "d:" + File.separator + "javatest" + File.separator + "1.txt";
		String pathReader = "d:" + File.separator + "javatest" + File.separator + "CollectionTest1.java";
		FileReader fr = new FileReader(new File(pathReader));
		FileWriter fw = new FileWriter(new File(pathWriter), true);
		char[] bufChar = new char[1024];
		int result = 0;
		while((result = fr.read(bufChar)) != -1) {
			fw.write(bufChar);
			System.out.println(new String(bufChar, 0, result));
		}
		
		fr.close();
		fw.close();
	}

}
posted on 2018-07-08 13:50  长嘴大耳怪  阅读(85)  评论(0编辑  收藏  举报