public static void out(PageContext pageContext, boolean escapeXml, Object obj) throws IOException {
		JspWriter w = pageContext.getOut();
		if (!(escapeXml)) {
			if (obj instanceof Reader) {
				Reader reader = (Reader) obj;
				char[] buf = new char[4096];
				int count;
				while ((count = reader.read(buf, 0, 4096)) != -1) {
					w.write(buf, 0, count);
				}
			} else {
				w.write(obj.toString());
			}

		} else if (obj instanceof Reader) {
			Reader reader = (Reader) obj;
			char[] buf = new char[4096];
			int count;
			while ((count = reader.read(buf, 0, 4096)) != -1) {
				writeEscapedXml(buf, count, w);
			}
		} else {
			String text = obj.toString();
			writeEscapedXml(text.toCharArray(), text.length(), w);
		}
	}