Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deserialization issue if I have serialized object to ByteArrayOutputStream

 
Maya Dolas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written following code



How do I deserialize the Cat object

I am trying something like this



My query is how to i obtain object from the buff array?
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Off the top of my head, one would read the Object from the ObjectInputStream:
 
Maya Dolas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep that worked, thanks. I was bit confused, thought since the object is serialized to bytearraystream a different approach needs to be taken.

Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic