Code example for CharArrayWriter

0
public class SimpleWrapper extends HttpServletResponseWrapper{ 
	private CharArrayWriter caw = null;
	 
	public SimpleWrapper(HttpServletResponse response) {
		super(response);
		caw  = new CharArrayWriter();
	} 
	 
	public String toString(){
		return caw.toString();
	} 
	 
	public PrintWriter getWriter(){
		return new PrintWriter(caw);
	} 
	 
	public ServletOutputStream getOutputStream(){ 
		return new SampleServletOutputStream(caw);
	} 
	 
	class SampleServletOutputStream extends ServletOutputStream{