Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

How to write partially in file.



Can anybody please tell me how to write partially in file.

What I want to know is , is there any method in writer classes of java.io package using which i can write partially in file.Or else I have to do it by myself.

Situation is , I have a file which holds some records , I save records in file using writeln() function of Printwriter class. Now if i want to delete any records or edit I have to read the whole file , delete or change the respective record and then write the whole file again in write mode by opening new file with same name.

I dont want to write the complete file, I want only to edit the records not the whole file writing?

Please Help...