java - Renaming a RandomAccessFile -


i have raf called data.bin , temporary raf called temp.bin.

        data = new randomaccessfile("data.bin","rws");         temp = new randomaccessfile("temp.bin","rws"); 

the temp file data.bin file alter information in it. once im done altering temp file how change name of temp.bin data.bin , delete old data.bin?

ive seen things renaming files .renameto() , stuff apply randomaccessfile. , couldnt find method rafs

randomaccessfile not designed replace file class.

it designed allow reading writing more or less.

please use file class renaming.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -