Reading a binary file in Java

前端 未结 2 1834
故里飘歌
故里飘歌 2021-01-04 11:50

I have a comparatively long file of unsigned integers (64 bits each, 0.47GB file) that I need to read and store in an array. After some brain racking I wound up using the ty

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-04 12:34

    You should use buffered input, something like:

    new DataInputStream(
        new BufferedInputStream(
            new FileInputStream(new File(input_file))))
    

提交回复
热议问题