If you use a RandomAccessFile Object to read the database file, I believe it does a lot of buffering for you. So I don't think you need to worry about buffering directly.
You must be careful with buffering however when dealing with multiple threads. A lot of people do away with the buffering in the RandomAccessFile by openening in the "rwd" mode. I don't believe you need to do this unless you have more than on RandomAccessFile object (some people do have more than one for some strange reason).
Joined: Jun 08, 2004
Thank you for your suggestions.
But throw using buffering I may simplified some implementations issues such as searching, so I still need to know if implementing read method to read from buffer is a valid choice.