SmartRefStream

To write it:
rr := SmartRefStream fileNamed: 'test.obj'.
rr nextPut: yourObject.
rr close.

To get it back:
rr := SmartRefStream fileNamed: 'test.obj'.
yourObject := rr next.
rr close.

See also:
SmartRefStream