package cn.com.hu;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class iocopy {
/**
* @param args
*/
public static void main(String[] args)
{
try {
BufferedReader br = new BufferedReader(new FileReader("D:/a.txt"));
BufferedWriter bw = new BufferedWriter(new FileWriter("D:/b.txt"));
String line = null;
while((line=br.readLine())!=null)
{
bw.write(line);
bw.newLine();
bw.flush();
}
bw.close();
br.close();
} catch (Exception e) {
// TODO: handle exception
}
}
}
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class iocopy {
/**
* @param args
*/
public static void main(String[] args)
{
try {
BufferedReader br = new BufferedReader(new FileReader("D:/a.txt"));
BufferedWriter bw = new BufferedWriter(new FileWriter("D:/b.txt"));
String line = null;
while((line=br.readLine())!=null)
{
bw.write(line);
bw.newLine();
bw.flush();
}
bw.close();
br.close();
} catch (Exception e) {
// TODO: handle exception
}
}
}