File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Write bufferedreader to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Write bufferedreader to a file " Watch "Write bufferedreader to a file " New topic

Write bufferedreader to a file

Sean K. Smith

Joined: Jan 24, 2012
Posts: 4
Hello, I have some data that is being output from a bufferedreader reading a URL to grab the HTML code. Right now my program just prints out the code but I want to put this into an HTML file. Any suggestions? Below is my code:
Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

What part are you having trouble with? Clearly you know how to use the I/O classes to read data, so you should be able to figure out how to use them to write to a File. Clearly you know how to read a line and then write it, and repeat in a loop.

So where are you getting stuck?
I agree. Here's the link:
subject: Write bufferedreader to a file
It's not a secret anymore!