我的程序是一个逐行读取文本文件,但是遇到大的文件时,显得很慢,请高手们指点一下
我的部分程序代码如下
public int extractInfo(String fileName,Vector fileInfo, Vector f_Valid) throws Exception
 {     String st = fileName;
     String str= null,str4=null;     //System.out.println("c:\\javamail\\inbox\\"+st);
     FileReader fr = null;
     try
     {
       fr = new FileReader("c:\\javamail\\inbox\\"+st);
}catch(Exception e){return 0;}
     BufferedReader br = new BufferedReader(fr);
System.out.println("B R E A K !");
int lno = 1;
     while((str4 = br.readLine()) != null)
     {
    str = str + str4+"\n";     }     br.close();
我想到了用buffering,单是那种方法可能太耗内存,请问高手们现在io操作的讲究效率常用方法