Java I/O streams; what are the differences?

后端 未结 9 1248
死守一世寂寞
死守一世寂寞 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 19:10

    I also found this java_tip_how_read_files_quickly

    Very useful! It shows which streams are most efficient.

    0 讨论(0)
  • 2020-12-12 19:13

    This is a big topic! I would recommend that you begin by reading I/O Streams:

    An I/O Stream represents an input source or an output destination. A stream can represent many different kinds of sources and destinations, including disk files, devices, other programs, and memory arrays.

    Streams support many different kinds of data, including simple bytes, primitive data types, localized characters, and objects. Some streams simply pass on data; others manipulate and transform the data in useful ways.

    0 讨论(0)
  • 2020-12-12 19:16

    Separate each name into words: each capital is a different word.

    • File Input Stream is to get Input from a File using a Stream.
    • File Output Stream is to write Output to a File using a Stream

    And so on and so forth

    As mmyers wrote :

    Streams: one byte at a time.

    Readers/Writers: one character at a time.

    Buffered*: many bytes/characters at a time.

    0 讨论(0)
提交回复
热议问题