code: public String getOutputAsString() {
  		if (stringWriter != null) {
  			return stringWriter.toString();
  		} else if (outputStream != null) {
  			String outputStr = null;
  
  			byte[] bytes = outputStream.getOutput();
  			if (bytes != null) {
  				try {
  					outputStr = new String(bytes, characterEncoding);
  				} catch (UnsupportedEncodingException e) {
  					outputStr = null;
  				}
  			}
  
  			return outputStr;
  		}
  
  		return null;
  	}
docs: Retrieves the content written to the response.
  
  @return the content written to the response outputStream or printWriter. Null is returned if neither
  {@link #getOutputStream()} or {@link #getWriter()} have been called.