Java I/O streams; what are the differences?

后端 未结 9 1252
死守一世寂寞
死守一世寂寞 2020-12-12 18:44

java.io has many different I/O streams, (FileInputStream, FileOutputStream, FileReader, FileWriter, BufferedStreams... etc.) and I am confused in determining th

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 18:53

    Streams: one byte at a time. Good for binary data.

    Readers/Writers: one character at a time. Good for text data.

    Anything "Buffered": many bytes/characters at a time. Good almost all the time.

提交回复
热议问题