java中字符流一次到底读几个字节?

马克-to-win:注意如果当遇到英文时,字符流足够聪明,一次就读一个字节,如遇到中文,一次读两个字节。比如a就占一个字节,即97.见下面的例子。我们摘录一段java官方文档:Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte input stream.

更多请见:https://blog.csdn.net/qq_44639795/article/details/102502590

posted @ 2021-10-08 17:44  小龙虾1  阅读(83)  评论(0)    收藏  举报