Java IO Review notes

Source: Internet
Author: User

1. what is IO?

Input Output

Java's core library, Java.io, provides a comprehensive IO interface. Include: file reading and writing, standard equipment output, etc. Io in Java is input and output on a stream basis, and all data is serialized to the output stream or read in from the input stream.

2. Why use Java IO?

3. What is the difference between Java io and Java NiO?

See:

4. skeleton

File class: The file object can be used to get or manipulate information related to disk files, such as: permissions, time, date, and directory path

5. How does JAVA IO work?

File:

1). How to construct the file class:

File (String directorypath)

File (string directorypath, string filename)

File (file dirobj, String filename)

2). Common methods for directory operations:

public boolean mkdir () creates a directory from an abstract pathname.

The public boolean mkdirs () creates a multi-tiered directory based on the abstract path name.

Public string[] List () returns the abstract path name that represents the file name and directory name in the path.

Public file[] Listfiles () returns an abstract path an array group that represents the file in the directory represented by this abstract path name.

Boolean exists ()

Boolean isfile ()

Boolean isdirectory ()

6. Precautions for use

7. optimization

8. Monitoring

Java IO Review notes

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.