Should I use DataInputStream or BufferedInputStream

前端 未结 7 939
南方客
南方客 2020-12-13 20:55

I want to read each line from a text file and store them in an ArrayList (each line being one entry in the ArrayList).

So far I understand that a BufferedInputStream

7条回答
  •  爱一瞬间的悲伤
    2020-12-13 21:44

    You shoud use DataInputStream in cases when you need to interpret the primitive types in a file written by a language other Java in platform-independent manner.

提交回复
热议问题