开发者

PushbackReader without EOF?

开发者 https://www.devze.com 2022-12-29 14:29 出处:网络
I\'m currently using PushbackReader and while waiting开发者_开发百科 for where it \'supposed\' to be an EOF, I get the character 65535 and I\'m wondering if that\'s normal.

I'm currently using PushbackReader and while waiting开发者_开发百科 for where it 'supposed' to be an EOF, I get the character 65535 and I'm wondering if that's normal.

Where is my EOF?!

Thank you.


Java char is unsigned; 65535 = 0xFFFF = -1; use int.


See also this java bug where in some JRE versions PushbackReader returns 65535 when reading an unread -1.

0

精彩评论

暂无评论...
验证码 换一张
取 消