Hi,

I'm getting StreamCorruptedException while running the following code
What can be the reason?Any help....

stream = new FileInputStream(copyName);
copy = new ObjectInputStream(stream);
Object o = copy.readObject();//this line throwing the exception
copy.close();
stream.close();
return o;

Let me explain the scenario which end up this exception...

I have developed an RCP application (Using eclipse 3.3) which have backup and
restore functionality. And this code was working fine.
But recently that application was migrated to eclipse 3.4.1 (Eclipse Ganymede)
and then it is throwing this exception while restoring the backups (.shc
file)created from Eclipse 3.3 version but working fine while restoring the
backups(.shc file) generated from Eclipse Ganymede.