
I have a filter, derived from multichar_output_filter, in which I am both prepending data and appending data. In other words the data being written to the sink will be greater than the data being passed into the filter's 'template<typename Sink> std::streamsize write(Sink& dest, const char* s, std::streamsize n)' member function, which my filter is implementing. Is this an allowable use of filters ? Do I still return the 'n' streamsize data being passed in or do I return the actual length of the data being written ? Can I use the 'template<typename T> std::streamsize write( T& t, const typename char_type_of<T>::type* s, std::streamsize n );' function to write the data, or do I need to 'put' each character to the sink using the 'template<typename Sink> void put(Sink& snk, typename char_type_of<Sink>::type c);' function instead ?