//filename is filepath stringBufferedReader br = new BufferedReader(new FileReader(new File(filename)));String line;StringBuilder sb = new StringBuilder();while((line=br.readLine())!= null){ sb.append(line.trim());}
使用StringBuilder比concat更有效http://kaioa.com/node/59
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)