The difference and understanding of byte stream and character stream

Byte stream reads or writes to the device in bytes, but character stream reads or writes to the device in units of characters.

If it is a binary file, it needs to be read with a byte stream. In general, character streams only deal with text files. In most cases, data is stored in the form of bytes in the device, so the character stream needs to pass in the byte stream as a parameter.

Guess you like

Origin blog.csdn.net/fuxingsheng1/article/details/80768565