PushbackReader without EOF?

I am currently using PushbackReader and while waiting for it to be "assumed" to be EOF, I get character 65535 and am wondering if this is ok.

Where is my EOF ?!

Thanks.

+2


a source to share


2 answers


Java char

is unsigned; 65535 = 0xFFFF = -1; use int

.



+3


a source


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



+1


a source







All Articles