1

I have built a data structure somewhat similar to a non clustered B+ tree index(on a field say K), over a data file with file offsets as my leaf node values. Now for any lookup, I need to read from a random point on the file. As I understand , most I/O methods on Java are optimized for bulk lookup. But since I already have a clustered index on another field, sorting on K is not an option. Is there any option in Java to optimize bulk reading of a file from random offsets ?

Thanks !!

ping localhost
  • 479
  • 3
  • 22

1 Answers1

0

Java io has support for random file access, which you can check out here:

Random Access Files (The Java™ Tutorials > Essential Classes > Basic I/O)

azurefrog
  • 10,785
  • 7
  • 42
  • 56