By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,778 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,778 IT Pros & Developers. It's quick & easy.

Forcing different Serialization/Externalization for identical references

P: n/a
GG
Hi all,

How would one force a deep reserialization for a collection whose
reference
is already known to be serialized by ObjectOutputStream (without using
custom
mechanisms, of course; in that case there's no question, is there?).

For example, I am trying to serialize a large number (hundreds of
thousands) of rows of a database, that I store as a List. Now, if I do
..clear() and try to serialize again, I would get the same result back
as the first thing I serialized. But if I create a "new" object every
time, I run out of memory pretty fast. Is there a standard way, or
should I roll my own solution?
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 13 Jul 2004 21:29:20 -0700, gr****@alum.mit.edu (GG) wrote or
quoted :
How would one force a deep reserialization for a collection whose
reference
is already known to be serialized by ObjectOutputStream (without using
custom
mechanisms, of course; in that case there's no question, is there?).


see reset method. That makes it forget about all the objects earlier
in the stream.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.