The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

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.

Message:

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().



Replies:

Sponsored Links



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