If you want to capture an entire line of input you might consider wrapping a BufferedReader around your existing reader and using the readLine() method to capture input. Then you can store the input in a
string and do with it as you please. That would look something like this:
To write the string to a file, you will need to open an outputStream and a writer to the file and then pass the string to the writer.