Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze IO flow simply

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

How to carry out a simple analysis of IO flow, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Classification of IO streams:

1. Divide it according to the data object of the stream:

High-end streams: all in-memory streams are high-end streams, such as InputStreamReader

Low-end flow: the flow in all external devices is low-end flow, such as InputStream,OutputStream

How to distinguish: all stream objects whose suffixes include Reader or Writer are high-end streams, otherwise, they are basically low-end flows, but there are exceptions. For example, PrintStream is high-end flows.

2. Divide according to the flow direction of the data:

Output stream: is used to write data, by the program (memory)-> external devices

Input stream: is used to read data by external devices-> programs (memory)

How to distinguish: generally speaking, the input stream has Input and the output stream has Output

3. Divide it according to the format of the stream data:

Byte stream: a stream that processes binary data such as sounds or pictures, such as InputStream

Character stream: a stream that processes text data, such as txt files, such as InputStreamReader

How to distinguish: it can be distinguished by high and low end streams. All low end streams are byte streams and all high end streams are character streams.

4. Divide it according to the packing process of the stream data:

Primitive flow: in the process of instantiating the object of the flow, it is called the original stream that does not need to pass in another stream as a parameter of its own constructor.

Wrapper flow: in the process of instantiating the object of the flow, you need to pass in another stream as the parameter of your own constructor, which is called the wrapper flow.

How to distinguish: all low-end flows are primitive flows, and all high-end flows are packaging flows.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report