import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Text {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
File read = new File("E:\\sk.txt");
File write = new File("E:\\sk1.txt");
BufferedReader br = new BufferedReader(new FileReader(read));
BufferedWriter bw = new BufferedWriter(new FileWriter(write));
String temp = null;
temp = br.readLine();
while(temp != null){
//写文件
bw.write(temp + "\r\n"); //只适用Windows系统
//继续读文件
temp = br.readLine();
}
bw.close();
br.close();
}catch(FileNotFoundException e){ //文件未找到
System.out.println (e);
}catch(IOException e){
System.out.println (e);
}
}
}