This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes data save into txt 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 "data save into txt file." Watch "data save into txt file." New topic
Author

data save into txt file.

Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
i have some input from user, and will save into a text file.

Title : "will go for cousin wedding"
Date : "9/9/06"
Note : "borrow car from uncle"

all string data from user.
which class i should use? FileOutputStream, BufferedOutputStream, StringWriter etc....

and i want every record in text file in new line , such as:

abc.txt
-----------------------------------------------------------
will go for cousin wedding, 9/9/06, borrow car from uncle // a record
here is another record of inputs. // another record

-----------------------------------------------------------

how to do that?


From NickyEng
Diploma in Computer Studies
SCJP 1.4
SCWCD 1.4
Formula 1 app by Maxis (Playbook)
Huw Morgan
Greenhorn

Joined: Mar 07, 2006
Posts: 23
A question I can answer. I have pincked the code from http://www.javacoffeebreak.com/java103/java103.html and hacked it a bit;

 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: data save into txt file.
 
It's not a secret anymore!