Next, let's talk about byte stream and byte stream.

Source: Internet
Author: User

Java defines two types of streams: byte streams and byte streams. Byte streams provide methods for processing the input and output of bytes. For example, when reading and writing binary data, byte streams are used. The character stream provides a convenient way to process character input and output. They use Unicode encoding, so they can be internationalized. Another point: At the bottom layer, All I/O is still byte-oriented. Character-based stream only provides a convenient and efficient way to process characters.

Byte stream

Byte streams are defined by two levels of classes. There are two abstract classes at the top level: inputstream and outputstream. Each abstract class has several sub-classes that process different devices.

Stream type
Description
Bufferedinputstream
Cached input stream
Bufferedoutputstream
Cached output stream
Bytearrayinputstream
Input stream for reading byte array content
Bytearrayoutputstream
Output stream of content written to the byte array
Datainputstream
Input stream that contains methods for reading java standard data types
Dataoutputstream
Output stream that contains methods for reading java standard data types
Fileinputstream
Input stream for reading file content
Fileoutputstream
Output stream of content written to the file
Filterinputstream
Implement inputstream
Filteroutputstream
Implement outputstream
Inputstream
Abstract class that describes Stream Input
Objectinputstream
Input stream for objects
Objectoutputstream
Used for the output stream of an object
Outputstream
Abstract class describing stream output
Pipedinputstream
Input MPs queue
Pipedoutputstream
Output Pipeline
Printstream
Output stream containing print () and println ()
Pushbackinputstream
1-Byte "unget" input stream is supported. This type of flow to the input stream returns 1 byte
Sequenceinputstream
Input stream composed of two or more input streams read sequentially


Next, let's talk about byte stream and byte 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.