Hi,
maybe I don't understand you right, but a newline in
Java is "\n" and on some OS also "\r". So in your case I would create a StringTokenizer.
This would print you out:
this is a
test over two lines
In this way you could detect every line until newline.
Bye
Rene