Home arrow static arrow Java Programming [Archive] - Search from millions of Records through File I/O
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Search from millions of Records through File I/O
This topic has 4 replies on 1 page.

Posts:25
Registered: 8/30/00
Search from millions of Records through File I/O  
Mar 13, 2002 10:14 PM



 
Hi All,

I want your suggestion for which File I/O i should go.
My client database is flat file and it has millions of records. The format for Flat file is fixed and it is like XML-type(not exactly XML).

I have to search for particular criteria on it. Can you suggest me which file I/O should i perform to get fastest response. Time is very critical for my case so can you suggest some of the methods to sarch as well as read from file.

Thanks
Taral Shah
(tarals@contechsoftware.com)
 

Posts:1
Registered: 11/7/02
Re: Search from millions of Records through File I/O  
Aug 8, 2004 11:47 AM (reply 1 of 4)



 
Hello
It is quite easy store the data in the file using ObjectOutputStream class. Read the records using ObjectInputStream. Using LinkedList class Search the records after loading in the LinkedList class' Object by referencing Object name and Variable name. U have to maintain the Data in a class as a Instance variable and implement the interface Serializable.
All the Best!
 

Posts:18,384
Registered: 21.03.00
Re: Search from millions of Records through File I/O  
Aug 8, 2004 11:50 AM (reply 2 of 4)



 
Hi,

Use a BufferedReader connected to a FileReader if you need to scan through the file.

/Kaj
 

Posts:18,384
Registered: 21.03.00
Re: Search from millions of Records through File I/O  
Aug 8, 2004 11:52 AM (reply 3 of 4)



 
Ops, it would be better to look at the date of the OP. Who does reply to a question that is 2 years old?

/Kaj
 

Posts:357
Registered: 8/5/04
Re: Search from millions of Records through File I/O  
Aug 8, 2004 11:59 AM (reply 4 of 4)



 
hey /Kaj please help me out in my other thread man!
 
This topic has 4 replies on 1 page.