FileInputStream fis = new FileInputStream("D:/abc.txt");//创建字节输入流
InputStreamReader isr = new InputStreamReader(fis);//将字节输入流转化为字符输入流
BufferedReader br = new BufferedReader(isr);//对字符输出流进行包装
FileOutputStream fos = new FileOutputStream("D:/123.txt");//创建字节输出流
OutputStreamWriter osw = new OutputStreamWriter(fos);//将字节输出流转化为字符输出流
BufferedWriter bw = new BufferedWriter(osw);//将字符输出流进行包装
String line;
while ((line=br.readLine())!=null);
{
bw.write(line);
bw.newLine();
}