1) Read into a buffer.
2) Redirect output to a file.