This content has been marked as final. Show 2 replies
I assume the reason is that you can't really append to such a file of serialized objects because you'd insert a set of header information where none is expected.
A header is written to the stream when an ObjectOutputStream is created. The stream is corrupt because your file has that header followed by some objects, and then another header.
You need to subclass ObjectOutputStream and make sure that it only writes that header once (i.e implement append mode)