作者在 2010-05-21 14:22:39 发布以下内容
import java.io.*;
public class Test {
public static void main(String[] args) {
try {
FileReader input = new FileReader("a.txt");
FileWriter output = new FileWriter("temp.txt");
int read = input.read();
while ( read != -1 ) {
output.write(read);
read = input.read();
}
input.close();
output.close();
} catch (IOException e) {
System.out.println(e);
}
}
}
public class Test {
public static void main(String[] args) {
try {
FileReader input = new FileReader("a.txt");
FileWriter output = new FileWriter("temp.txt");
int read = input.read();
while ( read != -1 ) {
output.write(read);
read = input.read();
}
input.close();
output.close();
} catch (IOException e) {
System.out.println(e);
}
}
}