Java I/O technology

Source: Internet
Author: User

I. Classification of STREAMS

Most of the Java stream classes are derived from the four abstract classes of InputStream, OutputStream, reader, and writer.

(1) by Data flow

Input stream (subclass of InputStream class and reader Class)

Output stream (subclass of OutputStream class and writer Class)

(2) by data type

Byte stream (subclass of InputStream class and OutputStream Class)

Character Stream (subclass of reader class and writer Class)

(3) According to the function can be realized

node streams such as FileReader, FileInputStream, etc.

Processing flows such as BufferedReader and Bufferedinputstream, etc.

1. File class

The file class is constructed in the following way:

(1) File (string pathname) creates a new file instance from an abstract path that is converted to an pathname pathname string.

(2) File (string pathname,string child) creates a new file instance based on the pathname pathname string and the children pathname string.

(3) File Parent,string Child creates a new file instance based on the parent abstract pathname and the children pathname string.

(4) The file (URL URI) creates a new file instance based on the abstract path name that the URI is converted to.

Java I/O technology

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.