The streams provided by the JDK inherit four classes: InputStream (byte input stream), OutputStream (byte output stream), Reader (character input stream), Writer (character output stream).
the main differences between character streams and byte streams are: 1. When the byte stream is read, a byte is returned, and the character stream is read to one or more bytes using the byte throttle (the number of bytes in Chinese corresponds to two, which is 3 bytes in the UTF-8 Code table). First check the specified encoding table and return the found characters. 2. The byte stream can handle all types of data, such as: Pictures, Mp3,avi video files, and character streams can only handle characters data. As long as you are dealing with plain text data, you should prioritize the use of character streams, in addition to byte streams .
Java Introduction to IO stream