Java I/O system

Source: Internet
Author: User
Java I/O system-general Linux technology-Linux programming and kernel information. The following is a detailed description. I. Input and Output
1. stream represents any data source capable of producing data or any receiving source capable of receiving data. In Java I/O, all streams (including Input and Out stream) have two types:
1.1 byte-oriented stream
A byte-oriented stream that reads or writes information to a stream in bytes. Byte-oriented streams include the following types:
1) input stream:
1) ByteArrayInputStream: uses a buffer in the memory as an InputStream.
2) StringBufferInputStream: Use a String object as InputStream.
3) FileInputStream: uses a file as InputStream to read the file.
4) PipedInputStream: implements the pipe concept and is mainly used in the process.
5) SequenceInputStream: combines multiple inputstreams into one InputStream.
2) Out stream
1) ByteArrayOutputStream: stores information in a buffer zone in the memory.
2) FileOutputStream: stores information in a file.
3) PipedOutputStream: implements the concept of pipe, which is mainly used in the process.
4) SequenceOutputStream: combines multiple outstreams into one OutStream.
1.2 Unicode Character-oriented stream
A Unicode-oriented stream that reads or writes information from a stream in units of Unicode characters. Unicode-oriented streams include the following types:
1) Input Stream
1) CharArrayReader: corresponds to ByteArrayInputStream
2) StringReader: corresponds to StringBufferInputStream
3) FileReader: corresponds to FileInputStream
4) PipedReader: corresponds to PipedInputStream.
2) Out Stream
1) CharArrayWrite: corresponds to ByteArrayOutputStream
2) StringWrite: no corresponding byte-oriented stream
3) FileWrite: corresponds to FileOutputStream
4) PipedWrite: corresponds to PipedOutputStream

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.