Code example for CharArrayWriter

Methods: toString

0
		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{ 
		private CharArrayWriter buffer = null;
		public SampleServletOutputStream(CharArrayWriter charArrayWriter){
			super(); 
			buffer = charArrayWriter;