They mean what they say: If c
is a newline (\n
) or carriage return (\r
) then break out of the loop. (A list of escape sequences in Java can be found here, or if you prefer something more official, JLS section 3.10.6.)
On a higher level; it means this method will process data until either a) a line-ending is hit, or b) the limit is reached (i < limit
condition in loop), whichever happens first.
As for why you need it: That's because presumably, one of the design requirements for that method was to have it stop at a line-ending, and that if
statement is the way that requirement was implemented.