Or do you have any other idea? I would prefer bypassing the Stream rather than having to put SetState() call to every place where it might be needed...
Honza
Set lims to value that allows fast Get/Put only in actual mode and forces _Get/_Put otherwise.
E.g. in read mode, set wrlim to buffer begin. Then when Put is used, it will go to _Put, where the situation can be fixed (and rdlim set to buffer begin).