简体   繁体   中英

Fast Random file access in java

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 !!

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM