Template API support render to Writer, and when render to OutputStream can reset encoding instead of default encoding