What is the fastest way I can read line by line with each line containing two Strings.
An example input file would be:
Fastest, Way
To, Read
One, File
Line, By Line
.... can be a large file
There are always two sets of strings on each line that I need even if there are spaces between the String e.g. "By Line"
Currently I am using
FileReader a = new FileReader(file);
BufferedReader br = new BufferedReader(a);
String line;
line = br.readLine();
long b = System.currentTimeMillis();
while(line != null){
Is that efficient enough or is there a more efficient way using standard JAVA API (no outside libraries please) Any help is appreciated Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…