How can we search data in flat files

I need to search for a particular list of account numbers whose data is stored in a flat file. Each line represents data for one account number. I also need to put all data for the searched account number into a new flat file.Can anyone help me on this?Thanks in advance....
[295 byte] By [Shilpa.Sharmaa] at [2007-10-3 4:39:11]
# 1
What did you write for the code? Or is there a problem deciding what to write in the code?
aniseeda at 2007-7-14 22:43:06 > top of Java-index,Java Essentials,Java Programming...
# 2
I m very new to java programming and dont know what to write in the code i.e are there any available methods to do so..or do we need to write a search logic...The thing is i have very limted time to finish this off
Shilpa.Sharmaa at 2007-7-14 22:43:06 > top of Java-index,Java Essentials,Java Programming...
# 3

> I m very new to java programming and dont know what

> to write in the code i.e are there any available

> methods to do so..or do we need to write a search

> logic..

That's correct you have to implemetn the logic, but it's pretty easy. Just a loop which reads each line from the file, and looks for the information.

Kaj

kajbja at 2007-7-14 22:43:06 > top of Java-index,Java Essentials,Java Programming...
# 4
Basic Java IO tutorial: http://java.sun.com/docs/books/tutorial/essential/io/Simple examples: http://javaalmanac.com/egs/java.io/ReadLinesFromFile.html http://javaalmanac.com/egs/java.io/WriteToFile.html?l=relThis should get you started.
aniseeda at 2007-7-14 22:43:07 > top of Java-index,Java Essentials,Java Programming...
# 5
Thnx for the info...
Shilpa.Sharmaa at 2007-7-14 22:43:07 > top of Java-index,Java Essentials,Java Programming...