I have to use the file as the database , But I am confused that how to insert the data into file . It is very stupid that copy the file and add the new data then rewrite a new file. And I notice that many database have store the data into the file and they both write in C/C++ . And I wonder how to achieve same function in Java. But I had try many times , use RandomAccessFile and FileChannel to insert the data . But it just overwrite the data at the position i want to insert .Some inspire idea will be help! Thanks :)!I have to use the file as the database , But I