I/O (input/output)---Byte stream and character stream

Source: Internet
Author: User

Flow:

is divided into the input stream and the output stream, the input/output is relative to the computer memory, the data input to the memory is the input stream, the data from the memory output is the output stream.

The flow object is constructed with a data source associated with it.

The data source is divided into: source data source and target data source. The input stream is contacted by the source data source, and the output stream is associated with the destination data source.

Divided by Flow direction:

Input stream: InputStream and read

Output stream: OutputStream and write

The input stream and output stream are also divided into byte stream and character stream:

Divided by processing data units:

BYTE stream: InputStream and OutputStream. A byte stream is a 8-bit universal stream, and the base unit is bytes.

Character streams: Read and write. A character stream is a stream of 16-bit Unicode characters, and the base unit is a Unicode character. Suitable for handling strings and text.

I/O (input/output)---Byte stream and character stream

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.