Can you explain the concept of streams?

前端 未结 15 1941
无人共我
无人共我 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条回答
  •  渐次进展
    2020-11-30 16:37

    The point of the stream is to provide a layer of abstraction between you and the backing store. Thus a given block of code that uses a stream need not care if the backing store is a disk file, memory, etc...

提交回复
热议问题