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

creating text file

bagaria kushal

Joined: Mar 29, 2011
Posts: 19
hello everyone,

I need to create a text file in which i have to write a pretty much large amount amount of data.
So please suggest me the best method to this which is fast and at the same time consistent also.
Stephan van Hulst

Joined: Sep 20, 2010
Posts: 4597

Hi Bagaria, welcome to CodeRanch.

You can simply use a BufferedWriter on top of a FileWriter.

The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
I agree. Here's the link:
subject: creating text file
jQuery in Action, 3rd edition