Virtual functions for replacing data to a stream. These functions should be overridden in derived classes.