input stream and output stream: The stream that is read into the program is the input stream (InputStream and the subclass of Reader), and the stream written out from the program to other media is the output stream (OutputStream and the subclass of writer). node flow and processing flow: node flow is a class that directly operates external media such as Fileoutputstream,fileinputstream,filewriter,filereader. The process flow is a stream of packets that are nested on a node stream, such as a buffered stream bufferedinputstream,bufferreader, a stream dateinputstream,dateoutputstream, and a inputstreamreader stream. Byte stream and character stream: a byte stream that ends with a stream. Range: ascll:0-126 unicode:0-65535originally many countries and regions have their own code: GBK,GB2312, etc., not unified. Unicode unifies the encoding of the world's text, with one character occupying two bytes. in Java, Unicode is used, with one character occupying two bytes and 16 bits.The char (character) type uses the international universal 16-bit Unicode character set, so it can automatically express most of the country's characters. each character in string strings is 16 bits, or 2 bytes, long integers, to provide support for Unicode characters. all stream types provided by Java are within the package java.io and are inherited from the following four abstract stream types, respectively. a simple understanding of these four abstract classes is: Write, read (write, read in is a program for reference)difference: The return value range for the int read () method of InputStream is 0-255 (bytes)The range of return values for the int read () method of reader is 0-65535 (character)The difference between OutputStream and writer's write () method looks at the API, which is written in detail. These four abstract classes are described below:InputStream: Streams that inherit from InputStream are used to enter data into the program, and the data is in bytes (8bit) [The Read () method in these classes obtains Unicode codes (two bytes, 16 bits), so The characters in the ASCLL code can be read correctly because their Unicode code and ASCLL code are the same (the Unicode code has a byte of 0 and the next byte is the corresponding ASCLL code). However, Chinese characters cannot be read because the Unicode code of Chinese characters is greater than 256, which accounts for two bytes. OutputStream: Streams that inherit from OutputStream are used to output data to the program, and the data is in bytes (8bit) Reader: Streams that inherit from reader are used to enter data into the program, and the data is in characters (16bit) Writer: Streams that inherit from writer are used to output data in the program, and the data is in characters (16bit) The above is a general overview of Io, and some examples of classes will be written later.
This article is from, be sure to keep this source http://java999.blog.51cto.com/259217/159843
Java IO stream