Forcing different Serialization/Externalization for identical references

Discussion in 'Java' started by GG, Jul 14, 2004.

  1. GG

    GG Guest

    Hi all,

    How would one force a deep reserialization for a collection whose
    is already known to be serialized by ObjectOutputStream (without using
    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?
    GG, Jul 14, 2004
    1. Advertisements

  2. GG

    Roedy Green Guest

    see reset method. That makes it forget about all the objects earlier
    in the stream.
    Roedy Green, Jul 14, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.