// obtain the writer - res.getWriter() must occur after res.setContentType()
Writer out = new BufferedWriter(res.getWriter(), 1024);
// get a serializer appropriate for the target media
BaseMarkupSerializer markupSerializer =
MEDIA_MANAGER.getSerializerByName(tsd.getSerializerName(),
new ChannelTitleIncorporationWiterFilter(out, channelManager, ulm));
// set up the serializer
markupSerializer.asContentHandler();
// see if we can use character caching
boolean ccaching = (CHARACTER_CACHE_ENABLED && (markupSerializer instanceof CachingSerializer));
channelManager.setCharacterCaching(ccaching);