aspose file tools*
The moose likes Beginning Java and the fly likes How to delete an object which is seraliazed from the file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to delete an object which is seraliazed from the file" Watch "How to delete an object which is seraliazed from the file" New topic
Author

How to delete an object which is seraliazed from the file

Ashuthosh san
Ranch Hand

Joined: Jan 28, 2009
Posts: 35
Hi,

I am writing some objects to file using writeObject(), and after reading using readObject() i want to delete that object from that file.
Could you please let me know how do i do it?

I want to delete those objects from the file once i am read.

Regards
Asha

amit punekar
Ranch Hand

Joined: May 14, 2004
Posts: 507
Hi,
I think you are writing the object's state using ObjectOutputStream that has handle to FileOutputStream. If that is the case you can delete the file in which the object was serialized using java.io.File.
Hope this helps.


Regards,
Amit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to delete an object which is seraliazed from the file
 
Similar Threads
How to delete from the middle of the file using object streams
Random Access File Question
Delete a file created and opened in IE
Deleting data form a file?
Update Serializable Object