The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Re: Serialization

Posted by Brian Sanders on November 26, 2001 at 5:32 PM

The default behavior of ObjectOutputStream is to write each Object only once, no matter how many times it is written to the stream. On subsequent calls to writeObject(), only a reference to the first Object is written.

To override this behavior, call the reset() method after each time you call writeObject().


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us