aspose file tools*
The moose likes Beginning Java and the fly likes I/O Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "I/O Question" Watch "I/O Question" New topic
Author

I/O Question

Rob Levo
Ranch Hand

Joined: Oct 01, 2000
Posts: 167
I need example code of reading the contents of a file into a StringBuffer object.
Thanks to anyone who can provide that example for me.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
This should do the trick. I even added a line to spit the contents back out to the console so that you could see what was in the StringBuffer.

I hope that helps,
Corey
[ April 18, 2002: Message edited by: Corey McGlone ]

SCJP Tipline, etc.
Rob Levo
Ranch Hand

Joined: Oct 01, 2000
Posts: 167
Thanks Corey, exactly what I needed!!
 
Consider Paul's rocket mass heater.
 
subject: I/O Question