Well I don't think there is an optimal method. It depends on the access
patterns of your data and so forth. How often will you be reading, writing, deleting, etc? Maybe thousands of reads for only a couple of writes? How much data is involved?
You check out the java.io package - if RandomAccessFile in there doesn't suit you, maybe you want to check out the New I/O package (java.nio).