File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 JavaScript Promises Essentials this week in the JavaScript 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: 8963
    
    9

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


[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