Java I/O
1 posts in topic
Flat View  Flat View

Posted By:   Muralidhar_Rao
Posted On:   Thursday, May 3, 2001 01:39 AM

I have to write and Read Serializable objects into a file, in such a way that when ever the object count reaches 10, 11th object should replace 1st, 12 should replace 2nd etc. This should keep on happening for 21st 22nd.. 31st, 32nd... etc. Where can I find the code for this.. Please help me out

Re: Java I/O

Posted By:   Tim_Rohaly  
Posted On:   Thursday, May 3, 2001 08:47 AM

Serialization streams are not like random access
files - you can't just replace objects you already
wrote the the stream. Read the Serialization FAQs
for an extended discussion of this.

What you need is to serialize each object separately
to a file, and do some database-like manipulation
of that file (search, retrieve, replace). You can start
by reading
"Use a RandomAccessFile to build a low-level database"

About | Sitemap | Contact