Friday, December 13, 2002 06:28 AM
If you don't want to go through the whole file, the key you want must be at a known offset or
- The fields must all be the same length
- The fields must be sorted
In either case you will want to use a RandomAccessFile and use the seek() method to go to a specific spot in the file. If the field is in a known location you can seek there. In the sorted case, you can do a binary search to find it.