标签:rgs txt todo throws exce rate string main generate
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
String pathWriter = "d:" + File.separator + "javatest" + File.separator + "1.txt";
String pathReader = "d:" + File.separator + "javatest" + File.separator + "CollectionTest1.java";
FileReader fr = new FileReader(new File(pathReader));
FileWriter fw = new FileWriter(new File(pathWriter), true);
char[] bufChar = new char[1024];
int result = 0;
while((result = fr.read(bufChar)) != -1) {
fw.write(bufChar);
System.out.println(new String(bufChar, 0, result));
}
fr.close();
fw.close();
}
}
标签:rgs txt todo throws exce rate string main generate
原文地址:https://www.cnblogs.com/changzuidaerguai/p/9279887.html