Meaningless Drivel is fun!*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Write bufferedreader to a file " Watch "Write bufferedreader to a file " New topic
Author

Write bufferedreader to a file

Sean K. Smith
Greenhorn

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
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Write bufferedreader to a file