OscarRyz
OscarRyz

Reputation: 199215

Deserialized object instance without class definition

In anyone aware of a tool/script/program/whatever to create a java object instance from a binary java serialized object?

I don't have the .class file, so I can't ( afaik ) simply create an ObjectInputStream and load it from there.

This object has the default serialization mechanism, and I'm trying to debug a problem we have.

Anyone?

Upvotes: 8

Views: 7358

Answers (3)

Tom Hawtin - tackline
Tom Hawtin - tackline

Reputation: 147154

Create a class with the correct name and serialVersionUID. Implement readObject. Use ObjectInputStream.readFields to get the ObjectInputStrem.GetFields.

Upvotes: 0

Fredrik
Fredrik

Reputation: 5839

There was a rather detailed post about the format in JavaWorld recently... Might be worth reading.

Link: http://www.javaworld.com/community/node/2915

Upvotes: 1

Eric
Eric

Reputation: 19863

I think what you want to accomplish is very similar to this post

Upvotes: 0

Related Questions