wood burning stoves 2.0*
The moose likes Java in General and the fly likes creating a file with user details in reccord format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "creating a file with user details in reccord format" Watch "creating a file with user details in reccord format" New topic
Author

creating a file with user details in reccord format

John David
Greenhorn

Joined: Aug 17, 2006
Posts: 29
respected Folks

i have to create file with n number of records.
each record contains some last name,firstname, city and state.
what may be the file type i.e extension of the file like doc or txt ?
how to insert those recors in to the file ?

please suggest me with code snippets/examples...

thank you
[ October 10, 2007: Message edited by: John David ]
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3429
    
  12
To learn how to write to a file you need to read the Java I/O tutorial.
Once you know how to write to a file, you need to decide what format you want the data to be in. Common ones are comma separated variables (CSV) and XML, although there are others depending on what exactly you intend to do with the data.
The file extension can be anything you like. It is only a hint to the OS as to what program to use to open/edit it. Your final choice will depend a lot on what format the data in the file has. XML files are usually given an .xml extension for example, but this is not an absolute requirement.


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating a file with user details in reccord format
 
Similar Threads
WA #1.....word association
java io
Creating a file by giving relative path
performance issues with file read and write
Struts FormFile (parsing .csv files)