@ Override public void write ( HttpServletResponse httpResponse , Object value ) throws IOException { final Document document = ( Document ) value ; document . serialize ( new OutputStreamWriter ( httpResponse . getOutputStream ( ) , "UTF-8" ) ) ; }
Serialize XML document to output stream of given HTTP response .