protected void writeObject(ContentHandler pHandler, Object pObject) throws SAXException { TypeSerializer ts = typeFactory.getSerializer(config, pObject); if (ts == null) { throw new SAXException("Unsupported Java type: " + pObject.getClass().getName()); } ts.write(pHandler, pObject); } protected void writeData(ContentHandler pHandler, Object pObject) throws SAXException {
public void startElement(String pURI, String pLocalName, String pQName, Attributes pAttrs) throws SAXException { if (inValueTag) { if (typeParser == null) { typeParser = factory.getParser(cfg, context, pURI, pLocalName); if (typeParser == null) { if (XmlRpcWriter.EXTENSIONS_URI.equals(pURI) && !cfg.isEnabledForExtensions()) { String msg = "The tag " + new QName(pURI, pLocalName) + " is invalid, if isEnabledForExtensions() == false."; throw new SAXParseException(msg, getDocumentLocator(), new XmlRpcExtensionException(msg)); } else { throw new SAXParseException("Unknown type: " + new QName(pURI, pLocalName), getDocumentLocator()); } } typeParser.setDocumentLocator(getDocumentLocator()); typeParser.startDocument(); if (text.length() > 0) { typeParser.characters(text.toString().toCharArray(), 0, text.length()); text.setLength(0); } } typeParser.startElement(pURI, pLocalName, pQName, pAttrs); } else { throw new SAXParseException("Invalid state: Not inside value tag.", getDocumentLocator()); } }
public void startElement(String pURI, String pLocalName, String pQName, Attributes pAttrs) throws SAXException { if (inValueTag) { if (typeParser == null) { typeParser = factory.getParser(cfg, context, pURI, pLocalName); if (typeParser == null) { if (XmlRpcWriter.EXTENSIONS_URI.equals(pURI) && !cfg.isEnabledForExtensions()) { String msg = "The tag " + new QName(pURI, pLocalName) + " is invalid, if isEnabledForExtensions() == false."; throw new SAXParseException(msg, getDocumentLocator(), new XmlRpcExtensionException(msg)); } else { throw new SAXParseException("Unknown type: " + new QName(pURI, pLocalName), getDocumentLocator()); } } typeParser.setDocumentLocator(getDocumentLocator()); typeParser.startDocument(); if (text.length() > 0) { typeParser.characters(text.toString().toCharArray(), 0, text.length()); text.setLength(0); } } typeParser.startElement(pURI, pLocalName, pQName, pAttrs); } else { throw new SAXParseException("Invalid state: Not inside value tag.", getDocumentLocator()); } }
private void writeValue(ContentHandler pHandler, Object pValue) throws SAXException { TypeSerializer ts = typeFactory.getSerializer(config, pValue); if (ts == null) { throw new SAXException("Unsupported Java type: " + pValue.getClass().getName()); } ts.write(pHandler, pValue); }
public void startElement(String pURI, String pLocalName, String pQName, Attributes pAttrs) throws SAXException { if (inValueTag) { if (typeParser == null) { typeParser = factory.getParser(cfg, context, pURI, pLocalName); if (typeParser == null) { if (XmlRpcWriter.EXTENSIONS_URI.equals(pURI) && !cfg.isEnabledForExtensions()) { String msg = "The tag " + new QName(pURI, pLocalName) + " is invalid, if isEnabledForExtensions() == false."; throw new SAXParseException(msg, getDocumentLocator(), new XmlRpcExtensionException(msg)); } else { throw new SAXParseException("Unknown type: " + new QName(pURI, pLocalName), getDocumentLocator()); } } typeParser.setDocumentLocator(getDocumentLocator()); typeParser.startDocument(); if (text.length() > 0) { typeParser.characters(text.toString().toCharArray(), 0, text.length()); text.setLength(0); } } typeParser.startElement(pURI, pLocalName, pQName, pAttrs); } else { throw new SAXParseException("Invalid state: Not inside value tag.", getDocumentLocator()); } }
/** Writes the XML representation of a Java object. * @param pObject The object being written. * @throws SAXException Writing the object failed. */ protected void writeValue(Object pObject) throws SAXException { TypeSerializer serializer = typeFactory.getSerializer(config, pObject); if (serializer == null) { throw new SAXException("Unsupported Java type: " + pObject.getClass().getName()); } serializer.write(handler, pObject); } }
/** Writes the XML representation of a Java object. * @param pObject The object being written. * @throws SAXException Writing the object failed. */ protected void writeValue(Object pObject) throws SAXException { TypeSerializer serializer = typeFactory.getSerializer(config, pObject); if (serializer == null) { throw new SAXException("Unsupported Java type: " + pObject.getClass().getName()); } serializer.write(handler, pObject); } }
protected void writeObject(ContentHandler pHandler, Object pObject) throws SAXException { TypeSerializer ts = typeFactory.getSerializer(config, pObject); if (ts == null) { throw new SAXException("Unsupported Java type: " + pObject.getClass().getName()); } ts.write(pHandler, pObject); } protected void writeData(ContentHandler pHandler, Object pObject) throws SAXException {
/** Writes the XML representation of a Java object. * @param pObject The object being written. * @throws SAXException Writing the object failed. */ protected void writeValue(Object pObject) throws SAXException { TypeSerializer serializer = typeFactory.getSerializer(config, pObject); if (serializer == null) { throw new SAXException("Unsupported Java type: " + pObject.getClass().getName()); } serializer.write(handler, pObject); } }
private void writeValue(ContentHandler pHandler, Object pValue) throws SAXException { TypeSerializer ts = typeFactory.getSerializer(config, pValue); if (ts == null) { throw new SAXException("Unsupported Java type: " + pValue.getClass().getName()); } ts.write(pHandler, pValue); }
private void writeValue(ContentHandler pHandler, Object pValue) throws SAXException { TypeSerializer ts = typeFactory.getSerializer(config, pValue); if (ts == null) { throw new SAXException("Unsupported Java type: " + pValue.getClass().getName()); } ts.write(pHandler, pValue); }
protected void writeObject(ContentHandler pHandler, Object pObject) throws SAXException { TypeSerializer ts = typeFactory.getSerializer(config, pObject); if (ts == null) { throw new SAXException("Unsupported Java type: " + pObject.getClass().getName()); } ts.write(pHandler, pObject); } protected void writeData(ContentHandler pHandler, Object pObject) throws SAXException {
private void writeValue(ContentHandler pHandler, Object pValue) throws SAXException { TypeSerializer ts = typeFactory.getSerializer(config, pValue); if (ts == null) { throw new SAXException("Unsupported Java type: " + pValue.getClass().getName()); } ts.write(pHandler, pValue); }