What is InputStream & Output Stream? Why and when do we use them?

前端 未结 8 1017
予麋鹿
予麋鹿 2020-11-29 14:09

Someone explain to me what InputStream and OutputStream are?

I am confused about the use cases for both InputStream and

8条回答
  •  臣服心动
    2020-11-29 15:13

    Stream: In laymen terms stream is data , most generic stream is binary representation of data.

    Input Stream : If you are reading data from a file or any other source , stream used is input stream. In a simpler terms input stream acts as a channel to read data.

    Output Stream : If you want to read and process data from a source (file etc) you first need to save the data , the mean to store data is output stream .

提交回复
热议问题