Read large amount of data from file in Java

后端 未结 7 1327
一生所求
一生所求 2020-12-03 01:36

I\'ve got text file that contains 1 000 002 numbers in following formation:

123 456
1 2 3 4 5 6 .... 999999 100000

Now I need

7条回答
  •  渐次进展
    2020-12-03 02:02

    I would extend FilterReader and parse the string as it is read in the read() method. Have a getNextNumber method return the numbers. Code left as an exercise for the reader.

提交回复
热议问题