In java, what is the fastest way to read a huge binary file into int[]
. I saw this solution
Fastest way to read huge number of int from binary file
But there is two solutions, and I don't know which is better. Also they seem to give a fixed maximum size for the int[], but how can I do it with a variable size? Like how can I set it to fit the amount of data in the binary exactly. Is there a way to know how many ints are there in the file?
Thanks