BufferedReader br = new BufferedReader(new FileReader("aaa.txt"));
BufferedWriter bw = new BufferedWriter(new FileWriter("bbb.txt"));
int ch= 0;
while((ch = br.read()) != -1) {
bw.write(ch);
}
br.close();
bw.close();
BufferedReader br = new BufferedReader(new FileReader("aaa.txt"));
BufferedWriter bw = new BufferedWriter(new FileWriter("bbb.txt"));
int len= 0;
char[] arr = new char[1024*8];
while((len = br.read(arr)) != -1) {
bw.write(arr, 0, len);
}
br.close();
bw.close(); |
|