星期二, 三月 22, 2005

Java 极其过度的IO设计

按行读入一个文本文件:
BufferedReader in = new BufferedReader(new FileReader("你的文件.txt"));
String s, s2 = new String();
while((s = in.readLine())!= null)
s2 += s + "\n";
in.close();