Java IO System Summary

Source: Internet
Author: User
Tags comparison comparison table

1 Java IO version

The IO of the Java library is divided into two parts: input/output.

The early Java 1.0 version of the input system was inputstream and its subclasses, and the output system was outputstream and its subclasses.

The later Java 1.1 version of the IO system was redesigned. The input system is reader and its subclasses, and the output system is writer and its subclasses.

Java1.1 is designed to be redesigned primarily to add internationalization support (that is, support for 16-bit Unicode code added). The IO system, which behaves as Java 1.0, is a byte stream, while the Java 1.1 IO system is character streams.

Byte throttling, which is the smallest data cell in the data stream is 8 bits.

Character stream, the smallest data cell in the data flow is a 16-bit character.

The byte stream does not use buffering when it is operating, and the character streams use buffering. Therefore, character streams are more efficient.

Why is it more efficient to use a buffer? That's because buffering is essentially a memory area, and files are mostly stored on hard drives or NAND flash. Read and write memory faster than read or write the hard disk or NAND flash files on the speed of a lot!

Currently, files are mostly stored in bytes. So in the development, the use of Word throttling is more extensive.

2 Comparison of IO classes for Java 1.0 and Java 1.1

Table 01_java 1.0 and Java 1.1 IO base class comparison table

Table 02_java 1.0 and Java 1.1 io adorner comparison table

The Java IO system is divided into basic classes and adorners because the basic class mainly divides streams into files, strings, and so on, and adorners are designed to implement "decorator Mode" (Refer to "4 decorator mode").

Related Article

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.