The solution to this is to introduce a temporary variable on the callback method. Here is code snippet.
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
public void startElement (String uri, String localName, String qName, Attributes attr) throws SAXException{
value = new StringBuffer(); if(qName.equalsIgnoreCase("clientDets")) { ncstClient = new NcstClient(); ncstClient.setType(attributes.getValue("type")); }}
public void characters(char[] ch, int start, int length) throws SAXException { value.append(new String(ch, start, length));}