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.

详情黏贴以下网址在地址栏后请进:http://www.mark-to-win.com/JavaBeginner/JavaBeginner8_web.html#ReaderReadHowManyByte


猜你喜欢

转载自blog.csdn.net/mark_to_win/article/details/71056067
今日推荐