IO stream in Java

Source: Internet
Author: User

The file object, which encapsulates the existing or nonexistent files into a Java object.

Second, the file in the program is in the form of flow to operate.

Flow: Data in the data source Path between (file) and program (memory)

input stream: Data from the data source (file) to the path of the program (memory)

output stream: Data from program (memory) path to the data source (file)

How can I tell if I am an input stream or an output stream?

In memory, if the data flows to the memory flow, it is the input stream, and conversely, the output stream.

third, file stream --classification

The Java stream is divided into two types of streams

1, byte stream: can be used to read and write binary files and any type of file byte

2, Character stream: can be used to read and write text files, cannot manipulate binary files

Byte stream character Stream

input InputStream Reader

Output OutputStream Writer

IO stream in Java

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.