java处理大量字符串
我现在有一个文本文件,需要一行一行读取出来,数据量很大。
Java code
String temp = null;
String[] args = null;
while((temp=reader.readline())!=null){
args = temp.split("[|]");
if(null!=dao.findbyid(args[2])){
System.out.println(temp);
}
}
reader.close();
像这种操作大量字符串数据的应该怎么做?StringBuffer类拼接字符串我晓得了,其他的呢?