It's not a secret anymore!*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "idea for this pls?!" Watch "idea for this pls?!" New topic
Author

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..)
10002
10009
30000
40000
500000
600000
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
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Hello,
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
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Also...
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.
Corey
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.
 
jQuery in Action, 2nd edition
 
subject: idea for this pls?!
 
Similar Threads
problems of a new bee
Vector and file read problem
how to make a setup package for a java program
jsp include with tld
Delete text when using RandomAccessFile