java - Serializing BTree to a file -


I'm trying to implement a BTree I work very much with trees and lots of small input Good work, which means that I have implemented the tree in memory, now I would like to play with large input, for which I have to write a tree in a file. I do not know where to start, I am using Java and I have not done much 'coding disk' coding any help would be very appreciated. If someone wants to help me with such an example which would be better.

If your BTree and its nodes are serialiable, you can use the object overputstream and fileoptrast in a file tree And write his content. It would be easy to test: write it in a .ser file, read it back, and see if you got the original BTree back.

There are some good examples in the package that will help you.

UPDATE: I do not see the case of your use to write dynamically because it is done according to the modifications or "do not want to write the whole tree."

It is impossible to slow down. It will take a long time to mirror each change in memory with related modification in the file.

If you are trying to implement your own database, then it makes sense to understand what is the scenario in your mind?


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -