Reading a binary file in Java

前端 未结 2 1826
故里飘歌
故里飘歌 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:45

    Want to object of the file:

    new ObjectInputStream(
        new BufferedInputStream(
            new FileInputStream(new File(file_name))))
    

    More about difference

提交回复
热议问题