The main difference between byte stream and character stream is their processing method
Byte stream is the most basic, all the subclasses of all InputStream and OutputStream are mainly used in processing binary data, which is processed by bytes.
However, there are many data in the actual text, and the concept of character flow is proposed. It is handled by the virtual machine's eNCode, that is, the transformation of the character set.
Between these two are associated with inputstreamReader, OutputStreamWriter, which is actually associated with Byte [] and String.
The Chinese characters in the actual development are actually caused by transforming between character flow and byte stream.
When converting from byte flow into a character stream, it is actually byte [] to string to string,
Public string (byte bytes [], string charsetname)
There is a key parameter character set encoding, usually we all omitted, the system uses the operating system LANG
When the character stream is converted to byte stream, it is actually String transformation to byte [],
Byte [] String.getBytes (String Charsetname)
Also the same
In Java.io, there have been many other streams, which is mainly to improve performance and convenient use.
SufferedInputStream, PipedinputStream, etc.