[Simple-support] How to deserialize from a stream
Brought to you by:
niallg
|
From: Tony T. <Ton...@st...> - 2008-09-03 17:35:13
|
I was able to serialize several objects to an output stream but now I would like to stream them back. There are too many objects to load them all into memory at once. It looks the Persister.read() method will work but, I have to pass in the object type that I am reading. I don't know what the type of the next object is because I have several different object types written to the XML file. Is there a way to stream each object back (one object in memory at a time) without knowing the object type ahead of time? I was able to serialize/deserialize all of my objects when I put them in a wrapper object and used @ElementList but, that requires they are all in memory at the same time so it really doesn't help me. Any other input would be helpful. Thanks. Tony This message (and any associated files) is intended only for the use of the individual or entity to which it is addressed and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from Stoneware, Inc. may be monitored. |