File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes how to access of record randomly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to access of record randomly" Watch "how to access of record randomly" New topic
Author

how to access of record randomly

rudra tripathy
Greenhorn

Joined: May 26, 2004
Posts: 25
i have got a files with predefined format.
i want to access each record randomly.
each record is a line.
pls help me
karl koch
Ranch Hand

Joined: May 25, 2001
Posts: 388
hi

how many records are in your file ?
if there is only a small number of records, then you can read it into an array (String[] or MyRecord[])or List manipulate it and then write it back to disk. or you can just acccess the file, skip all the lines you dont need...

also check the RandomAccessFile API and
google random access file or consider a real database.

cheers
k
[ July 05, 2004: Message edited by: karl koch ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to access of record randomly