int length = SVNBase64.base64ToByteArray(cdata, buffer);
int length = SVNBase64.base64ToByteArray(new StringBuffer(cdata.toString().trim()), buffer);
	protected void endElement(DAVElement parent, DAVElement element, StringBuffer cdata) throws SVNException {        DAVElement name = null;        String value = null;        if (element == DAVElement.RESPONSE) {            if (myCurrentResource.getURL() == null) {                invalidXML();            }            myResources.put(myCurrentResource.getURL(), myCurrentResource);            myCurrentResource = null;                        return;        } else if (element == DAVElement.PROPSTAT) {            if (myStatusCode != 0) {                for (Iterator names = myCurrentProperties.keySet().iterator(); names.hasNext();) {                    DAVElement propName = (DAVElement) names.next();                    String propValue = (String) myCurrentProperties.get(propName);                    if (myStatusCode == 200) {                        myCurrentResource.setProperty(propName, propValue);                    }                }                myCurrentProperties.clear();            } else {                invalidXML();            }            return;        } else if (element == DAVElement.STATUS) {            if (cdata == null) {                invalidXML();            }            try {                HTTPStatus status = HTTPStatus.createHTTPStatus(cdata.toString());                if (status == null) {                    invalidXML();                }                myStatusCode = status.getCode();            } catch (IOException e) {                invalidXML();            }            return;        } else if (element == DAVElement.HREF) {            if (parent == DAVElement.RESPONSE) {                // set resource url                String path = cdata.toString();                if (path.endsWith("/")) {                    path = path.substring(0, path.length() - 1);                }                myCurrentResource.setURL(path);                return;            }            name = parent;            if (name == null) {                return;            }            value = cdata.toString();        } else if (cdata != null) {            if (myCurrentProperties.containsKey(element)) {                // was already set with href.                return;            }            name = element;            if (myEncoding == null) {                value = cdata.toString();            } else if ("base64".equals(myEncoding)) {                byte[] buffer = allocateBuffer(cdata.length());                 int length = SVNBase64.base64ToByteArray(cdata, buffer);                try {                    value = new String(buffer, 0, length, "UTF-8");                } catch (UnsupportedEncodingException e) {                    value = new String(buffer, 0, length);                }                            } else {                invalidXML();            }            myEncoding = null;        }        if (name != null && value != null) {            myCurrentProperties.put(name, value);        }	}