This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes File IO - BufferedWriter/FileWriter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "File IO - BufferedWriter/FileWriter" Watch "File IO - BufferedWriter/FileWriter" New topic

File IO - BufferedWriter/FileWriter

O. Ziggy
Ranch Hand

Joined: Oct 02, 2005
Posts: 430

I wrote the following test:

The output of the above program is

Any idea why there is a big gap on the output? I have a feeling it is to do with fact that i declared char as 50000 but i cant see how that would have caused it as it was used for reading not writing.

Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
Well, at line 32 you have

where 'c' is your 50k buffer. Maybe it has something to do with that.
subject: File IO - BufferedWriter/FileWriter
Similar Threads
close() method; I/O class chaining
Reading alarge file and wrapping content
Unexpected Behaviour with Writers
Writing to File
Create .txt file