Create a writer that collects the supplied text into lines that are written indivually to the specified line
writer. The newline character indicates the end of a line.
If the text ends with an unterminated line, that line is passed to the line writer as if it had been terminated,
provided that flush() is called after all text has been written. The behavior of flush() is
non-standard; it should not be called at any other time.
Parameters:
target - The line writer to receive the text lines.
Calling flush will output the current non-empty partial line as if a newline had been written.
public void flush()
throws IORuntimeException
Calling flush will output the current non-empty partial line as if a newline had been written.
This method should be called only when there is no more text to be written.
Effectively, it adds a newline to text that ends with an unterminated line.