Code example for StringWriter

Methods: getBuffer

0
 
	public String getBufferedResponse() {
		String bufferedResponse = null;
 
		if (stringWriter != null) {
			bufferedResponse = stringWriter.getBuffer().toString();
		} 
 
		return bufferedResponse;
	} 
 
	@Override 
	public void setContentType(String type) {
		// NOTE: This method is deliberately overridden and does nothing. If not overridden, then in the case of Ajax, 
		// the JSP engine would end up setting the content-type of the HttpServletResponse to something other than 
		// text/xml which causes the DOM replacements to fail in the browser. 
	} 
 
	@Override 
	public PrintWriter getWriter() throws IOException {