Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #7677
| From | "raphfrk@gmail.com" <raphfrk@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: De-serializing an object with missing child classes |
| Date | 2011-09-07 07:14 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <4d1a98fa-bef3-45d5-97c3-3df29265ffe1@hb5g2000vbb.googlegroups.com> (permalink) |
| References | <774ae53e-c127-4d79-8267-d8c8197d0dfb@z7g2000vbp.googlegroups.com> <a8c55b80-c7c2-4eaa-90b3-019fffe037ce@a13g2000yqd.googlegroups.com> <9651530b-9ed9-41cc-b686-b0644226a65a@a31g2000vbt.googlegroups.com> <9coeqfFfujU1@mid.individual.net> |
On Sep 7, 6:46 am, Robert Klemme <shortcut...@googlemail.com> wrote: > I am not sure I get exactly what you mean here. Do you want to > resurrect class objects (i.e. the code) from the stream? I don't think > this is possible without complex logic. I was thinking that the standard deserializer might be a relatively low complexity recursive method. It may be possible to copy that and update it where it checks for a class match. In the end I just had the custom reader use the defaultReadObject() method and then read again. If it hit EOF, then I assumed that it was the old type. Otherwise it read the extra info and updated accordingly. When read, it stored the child objects as either a byte array stored in a dummy object or as the actual object if it could be deserialized.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
De-serializing an object with missing child classes "raphfrk@gmail.com" <raphfrk@gmail.com> - 2011-09-06 05:15 -0700
Re: De-serializing an object with missing child classes Robert Klemme <shortcutter@googlemail.com> - 2011-09-06 05:34 -0700
Re: De-serializing an object with missing child classes "raphfrk@gmail.com" <raphfrk@gmail.com> - 2011-09-06 07:17 -0700
Re: De-serializing an object with missing child classes Robert Klemme <shortcutter@googlemail.com> - 2011-09-07 07:46 +0200
Re: De-serializing an object with missing child classes Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-09-07 11:45 +0000
Re: De-serializing an object with missing child classes "raphfrk@gmail.com" <raphfrk@gmail.com> - 2011-09-07 07:17 -0700
Re: De-serializing an object with missing child classes "raphfrk@gmail.com" <raphfrk@gmail.com> - 2011-09-07 07:14 -0700
Re: De-serializing an object with missing child classes Roedy Green <see_website@mindprod.com.invalid> - 2011-09-06 06:04 -0700
Re: De-serializing an object with missing child classes Roedy Green <see_website@mindprod.com.invalid> - 2011-09-06 11:59 -0700
Re: De-serializing an object with missing child classes Arne Vajhøj <arne@vajhoej.dk> - 2011-09-06 19:51 -0400
Re: De-serializing an object with missing child classes markspace <-@.> - 2011-09-06 17:53 -0700
Re: De-serializing an object with missing child classes Arne Vajhøj <arne@vajhoej.dk> - 2011-09-06 19:53 -0400
csiph-web