Hi Vinit,
readline() behaves like Mike have specified. It blocks until it runs into "\n", "\r", "\r\n", or EOF.
However it still keeps data already read in. It just won't be returned until function comes across one of previously specified delimiters.
You might want to check out:
readLine()
and
Source which says:
464: // We only want to return null when no characters were read before
465: // EOF.
HTH
Welcome to JavaRanch!