aspose file tools
The moose likes Beginning Java and the fly likes writing to file - HELP!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "writing to file - HELP!!!" Watch "writing to file - HELP!!!" New topic
Author

writing to file - HELP!!!

Naf Rash
Ranch Hand

Joined: Feb 19, 2004
Posts: 85
I am trying to write some results from my program to a file - I think this should be fairly straightforward especially since there is quite a lot of information to do that. My problem is with respect to the way I need the results to be written to the file. For instance, the results I want displaying are in an array - and for each line of the file I want all the rows for a particular column to be output in the following way:
{some numbers(ints) separated by a comma indicating the next element for that column(ie, the next row)}
I want this to be done for every column.
My problem is that I don't know how to do this - if it was a matter of taking some data from a textfield the matter would be fairly straight forward.
Does anyone have any suggestions???
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24061
    
  13

Well, you'd just use a couple of "for" loops, yes?

Be sure to use a BufferedWriter, or all these little writes will be slow.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: writing to file - HELP!!!
 
Similar Threads
Java XML persistence
Java XML persistence
Inline editing in JSF
File parsing woes
Calling more than one method from a Servlet.