In the last week of study, we learned IO.
Io is a stream. So what is the flow for?
Do you want to read this file when our computer reads a file or prints a file on the computer? So when we read this file we are going to open a stream, which is equivalent to a water pipe, for file transmission. When our computer needs to read a file, this stream is called the input stream, which is called the output stream when we want to upload a file from the computer to another place. Each time the transfer of files or information we have to open a stream, after the end of the flow to close, you can imagine that you are in the faucet under the water, you have to open the water faucet, the water is not to close this faucet?!
When we're transferring things, we need to open a low-level stream and then open a premium stream to protect this low-level stream, why open a high-level stream to protect it? You can imagine when you're getting water. To be safe, you need to put a big pipe outside your little pipe and take care of the little pipe!
Since the transmission of the thing is bound to involve two objects, we transmit something that is actually transmitted between these two things. This is the low-level application of the stream. So what is the advanced application of streaming? When is the advanced application of the stream used?
The simplest stream of high-level example is QQ chat, why say QQ chat with the high-level stream it? I chat with you, I say a word how do you accept this news? The process is QQ software to open a receive stream to receive my message, and then open an output stream to send my message to you, which also uses the input and output streams.
There are many applications for input and output streams that we need to learn more deeply.
Summary of week Five