Java io-node stream and filter stream

Source: Internet
Author: User

(1) node stream: A stream class that reads and writes from a specific place, such as a disk or a memory area.

Filter stream: Use the node stream as the input or output. A filter stream is created using an existing input stream or output stream link. (2) In the inputstream class and outputstream class subclass, the filter abstract classes of filterinputstream and filteroutputstream are derived from the datainputstream and dataoutputstream data input and output stream classes. (3) The main feature of stream filtering is that the transmitted data can be converted to a specified type or format at the same time as the input and output data, you can understand and encode binary bytes. (4) datainputstream defines multiple reading methods for different types of data, such as readbyte (), readboolean (), readshort (), readchar (), and readint (), readlong (), readfloat (), readdouble (), Readline (), etc. The data output stream is similar to dataoutputstrean.
(5) bufferedoutputstream buffer output stream bufferedouputstream class provides the same write operation method as fileoutputstream, but all output is written to the buffer. When the buffer is full or the output stream is closed, it is output to the stream at one time, or the buffer is actively output to the stream using the flush () method. (6) bytearrayinputstream (byte array input stream) bytearrayinputstream uses byte arrays as the source input stream. This class has two constructor methods. Each constructor requires a byte array to provide a data source.


Related Article

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.