How can I do block oriented disk I / O using Java? Or similar for B + tree

I would like to implement B + tree in Java and try to optimize it for disk-based I / O. Is there an API for accessing individual disk blocks from Java? or is there an API that can perform similar block-oriented access that fits my purpose?

I would like to create something like Tokyo Cabinet in 100% Java. Is there anyone who knows which Java databases, such as JavaDB , are used for this in the background?

I know that there are probably languages ​​other than Java that can do this better, but I only do this for training purposes.

+4
source share
1 answer

At the top of my head, I think MappedByteBuffer in NIO might be your best bet. This is basically a direct-as-possible mapping between HDD and Java.

+6
source

Source: https://habr.com/ru/post/1305921/


All Articles