IO Overview of Java io (i)

Source: Internet
Author: User

Preface:
IO for the system design, is a very important point of concern, often the bottleneck in the system operation in the IO design, whether it is database io, file io or network IO, need to be refined design, in order to make the system to achieve the best running state. For modern system concurrency and data volume explosion, IO processing is more important for the system. Studying Java IO is good for our work.
The java.io contains the Java blocking IO design. Java IO consists of three main parts:
1. The main part of the flow-type part –io;
2. Non-streaming section – a class consisting mainly of some auxiliary flow sections, such as the file class, the Randomaccessfile class, and the FileDescriptor class;
3. The file read section of the security-related classes, such as: Serializablepermission class. and classes of file systems related to the local operating system, such as the FileSystem class and the Win32filesystem class and the Winntfilesystem class.
Java.io packet is mainly a byte stream and character stream, input and output, flow has the most basic features: flow is one, one-way.
The following is a look at the specific class diagrams of most classes in the Java.io package to understand their inheritance relationships.
BYTE input stream:

BYTE output stream:

Character input stream:

BYTE output stream:

From the above-mentioned class diagram, the byte stream and the character stream are mostly implemented in InputStream, OutputStream, Writer, reader interface.
Java.io Series interface and implementation, the use of a large number of decorator design patterns, which allows the class function can be extended without changing the original class structure, and we can also create their own decorators to wrap some specific stream classes.

In the next series, this series will begin with the byte stream, which is analyzed for each stream and the flow of each adornment. This paper analyzes and uses the source code.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

IO Overview of Java io (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.