Can you explain the concept of streams?

前端 未结 15 1979
无人共我
无人共我 2020-11-30 15:54

I understand that a stream is a representation of a sequence of bytes. Each stream provides means for reading and writing bytes to its given backing store. But what is the

15条回答
  •  旧时难觅i
    2020-11-30 16:56

    Think of streams as of an abstract source of data (bytes, characters, etc.). They abstract actual mechanics of reading from and writing to the concrete datasource, be it a network socket, file on a disk or a response from the web server.

提交回复
热议问题