[HOW DO I?] Objects to/from disk...
Bert Freudenberg
bert at isgnw.CS.Uni-Magdeburg.De
Tue Dec 21 11:14:42 UTC 1999
On Mon, 20 Dec 1999, Ali Chamas wrote:
> Hi,
>
> Whats *THE BEST WAY* to store/read objects to/from
> disk? Can any object be converted to a binary form,
> then read-in? Is it true that you must have the class
> defined before creating a new object? I've noticed
> that different classes implement their own read/write
> methods here and there, suggesting that it's not as
> simple as archiving anything to/from disk. Can anybody
> update my knowledge :? My Stream experience is a
> little fresh...<GASP!!>
There are at least three variants ...
1.) storeOn:/readFrom: - recursively stores source code that is
compiled and evaluated on loading.
2.) storeDataOn:/readDataFrom: - uses SmartRefStream for
recursive binary storage.
3.) ImageSegments - basically stores/loads parts of the object memory.
The is the simplest to understand, the second is faster and allows classes
to be stored, the last one is the most advanced - it's so hot I didn't
even try it yet ;-)
-Bert-
More information about the Squeak-dev
mailing list
|