This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Deserialization issue if I have serialized object to ByteArrayOutputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Deserialization issue if I have serialized object to ByteArrayOutputStream" Watch "Deserialization issue if I have serialized object to ByteArrayOutputStream" New topic
Author

Deserialization issue if I have serialized object to ByteArrayOutputStream

Maya Dolas
Greenhorn

Joined: Jul 04, 2007
Posts: 26
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?


<b><i>Maya</i></b>
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8707
    
    6

Off the top of my head, one would read the Object from the ObjectInputStream:


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Maya Dolas
Greenhorn

Joined: Jul 04, 2007
Posts: 26
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deserialization issue if I have serialized object to ByteArrayOutputStream
 
Similar Threads
Inheritance and Serialization
Serialization Problem
In how many ways we can create an object? could you Explain with example if possible.
ByteArrayStream steam!
Convert an Object to ByteArray