Navigation: Programming Cookbook >
Binary Filing Objects
In Smalltalk, whenever you save your image, your entire world is saved to an image file so that when it is reloaded, everything is miraculously, and conveniently, still there. However, it very useful to be able to save objects to disk independently of the 'all or nothing' image file. For instance, you may want to copy objects to another image, perhaps to that of a customer, or maybe you need to 'clone' an object a number of times when the original is not present in the image.
If you encounter these or similar situations, consider making use of Dolphin's Smalltalk Binary (STB) Filing classes. These classes provide a mechanism for serializing objects into a compact binary data structure that can reside either in a ByteArray or on a disk file. Dolphin uses STB itself in the Packaging system and a modified version (STL) is used as the storage format for its View Resources.