public class Test{
/*FileReader/FileWriter读写乱码,待处理*/
public static void main(String[] args) throws IOException{
FileReader fileReader = null;
FileWriter fileWriter = null;
try{
fileReader = new FileReader("c:/123/666.doc");
fileWriter = new FileWriter("c:/123/999.doc");
int len = 0;
char[] buffer = new char[1024];
while((len=fileReader.read(buffer))!=-1){
fileWriter.write(buffer, 0, len);
}
}catch (Exception e) {
e.printStackTrace();
}finally{
fileReader.close();
fileWriter.close();
}
}
}