Serialzation in files.
1 posts in topic
Flat View  Flat View

Posted By:   Kedar_Bhumkar
Posted On:   Tuesday, January 22, 2002 10:58 AM

I get a Streamcorrupted Exception when I read appended serialized objects from a file.

How do I overcome this?

Re: Serialzation in files.

Posted By:   Simon_Ablett  
Posted On:   Wednesday, January 23, 2002 05:51 AM

Depends how you are reading them back in. Are you sure that you are reading the objects back in in the order that they were written. That is to say, assume that the file contains instances of 5 objects written in the following order: A -> B -> C -> D -> E. Then to read them back in you'd expect to obtain, object A first, B second, C third and so on. If you tried to read object B as an object of type C (or whatever) then that would certainly cause problems. Don't know if this helps.

About | Sitemap | Contact