<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=How_to_dump_and_restore_an_Object</id>
	<title>How to dump and restore an Object - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=How_to_dump_and_restore_an_Object"/>
	<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=How_to_dump_and_restore_an_Object&amp;action=history"/>
	<updated>2026-05-08T12:47:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>http://95.179.246.60/mediawiki/index.php?title=How_to_dump_and_restore_an_Object&amp;diff=66&amp;oldid=prev</id>
		<title>Nmingott: imported material</title>
		<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=How_to_dump_and_restore_an_Object&amp;diff=66&amp;oldid=prev"/>
		<updated>2025-05-03T23:26:45Z</updated>

		<summary type="html">&lt;p&gt;imported material&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TODO&amp;#039;&amp;#039;&amp;#039;. Examples, understand better what really happens.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Problem&amp;#039;&amp;#039;&amp;#039;. I want to dump an object and store it into the filesystem the recover it when I whish it will be a proper time. How do I do ?&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution&amp;#039;&amp;#039;&amp;#039;. There are several ways to solve this problem trading off simplicity and power. Let&amp;#039;s go from the simplest to the most complex and powerful.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Solution-1&amp;#039;&amp;#039;&amp;#039;. The simplest, using  &amp;lt;code&amp;gt;ObjectFoo&amp;gt;&amp;gt;storeString&amp;lt;/code&amp;gt; or the equivalent for streams.&lt;br /&gt;
** +] Very easy&lt;br /&gt;
** +] The dump is human readable&lt;br /&gt;
** -] It is not intended to dump cyclic structures&lt;br /&gt;
** -] The internal variables of ObjectFoo are stored by position, not by name. If you change the class ObjectFoo and then try to recover and old dump you will make a mess.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Solution-2&amp;#039;&amp;#039;&amp;#039;. &amp;lt;code&amp;gt;ReferenceStream&amp;gt;&amp;gt;dumpOnFile:&amp;lt;/code&amp;gt;&lt;br /&gt;
** -] more complex, it spits out a binary file&lt;br /&gt;
** +] restist to cycles in the data structure to dump&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Solution-3&amp;#039;&amp;#039;&amp;#039;. &amp;lt;code&amp;gt;SmartRefStream&amp;gt;&amp;gt;dumpOnFile:&amp;lt;/code&amp;gt;&lt;br /&gt;
** -] even more complex, larger file, binary file&lt;br /&gt;
** +] resist to cycles&lt;br /&gt;
** +] resist to moderate changes in the ObjectFoo class because internal variable are stored with name and value.&lt;/div&gt;</summary>
		<author><name>Nmingott</name></author>
	</entry>
</feed>