This content has been marked as final. Show 2 replies
You are calling mark(1), which sets a read-ahead limit of 1, then calling readLine(), which is almost certainly going to need to read more than one character.
I suggest another look at the Javadoc. There's not much point in writing arbitrary code and wondering why it doesn't work.