Code example for CharArrayWriter

Methods: write

0
		} 
 
		public void characters(char[] ch, int start, int length)
				throws SAXException { 
			 
			buf.write(ch, start, length);
		} 
 
		public void endElement(String uri, String localName, String qName)
				throws SAXException { 
			if (qName.equals("portalLayouts")) {
				if (!firstLayoutElement) {
					appendDivision("}"); 
				} 
				idStack.clear();
			} else if (qName.equals("portallayout")) {
				if (endLayoutElement && !close) {
					appendDivision("}"); 
					close = true;
				} 
				endLayoutElement = true;