From: Brian G. <br...@qu...> - 2004-03-01 23:24:37
|
>I am sure I am getting this wrong but: > >The FastWriter API only had one output object to deal with: a Writer, >so could be used to render to the output stream or to strings. The FastWriter actually had several (poorly documented!) ways of doing things. You could attach a FastWriter to an OUTPUT STREAM, in which case it would act like a writer but do its own bytes-to-chars thing using the encoding cache, OR, you could not bind it to a stream, and instead call .toString() to get the result as a String. >You have now chosen to treat Strings differently to the Response, as >StringWriters do not have a getOutputStream method. You now have the same two choices directly from Template: - write the results to an OUTPUT STREAM (template.write(outputStream, c)) - write the results to a STRING (template.evaluateAsString(c)) Simple! -- Brian Goetz Quiotix Corporation br...@qu... Tel: 650-843-1300 Fax: 650-324-8032 http://www.quiotix.com |