File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes idea for this pls?! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "idea for this pls?!" Watch "idea for this pls?!" New topic

idea for this pls?!

vivek sivakumar
Ranch Hand

Joined: Aug 09, 2001
Posts: 187
well i have a file say list.ini and following are the contents (contents might grow also..)
so my problem i need to read these values from this file and store it in a vector!!!pls give me an idea on how to do it?

SCJP, SCWD <br />A farmer learns more from a bad harvest than a good one.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Here's a basic file reader that puts the data into a Vector:

You'd probably find lots of useful information if you were to do a search on the I/O and Streams Forum. The search page link is at the top right of this page.
Good Luck.
[ April 04, 2002: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Chapters 21, 22, and 23 of Bradley Kjell's Java Tutorial do a decent job of covering the topics of file input and output.
And Chapter 10 of David J. Eck's Java Tutorial covers input and output in Java.
Good Luck.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
This should do the trick...

If you have any questions, let me know.
Update: I see Dirk is a little faster on the draw than I am. Nice shootin', Tex!
[ April 04, 2002: Message edited by: Corey McGlone ]

SCJP Tipline, etc.
I agree. Here's the link:
subject: idea for this pls?!
It's not a secret anymore!