public void endElement(String pURI, String pLocalName, String pQName) throws SAXException { if (--level == 0) { try { decoder.flush(); } catch (IOException e) { throw new SAXParseException("Failed to decode base64 stream.", getDocumentLocator(), e); } setResult(baos.toByteArray()); } else { throw new SAXParseException("Unexpected end tag in atomic element: " + new QName(pURI, pLocalName), getDocumentLocator()); } }
public void characters(char[] pChars, int pStart, int pLength) throws SAXException { if (baos == null) { if (!isEmpty(pChars, pStart, pLength)) { throw new SAXParseException("Unexpected non-whitespace characters", getDocumentLocator()); } } else { try { decoder.write(pChars, pStart, pLength); } catch (IOException e) { throw new SAXParseException("Failed to decode base64 stream.", getDocumentLocator(), e); } } }
public Object getResult() throws XmlRpcException { try { byte[] res = (byte[]) super.getResult(); ByteArrayInputStream bais = new ByteArrayInputStream(res); ObjectInputStream ois = new ObjectInputStream(bais); return ois.readObject(); } catch (IOException e) { throw new XmlRpcException("Failed to read result object: " + e.getMessage(), e); } catch (ClassNotFoundException e) { throw new XmlRpcException("Failed to load class for result object: " + e.getMessage(), e); } } }
public void startElement(String pURI, String pLocalName, String pQName, Attributes pAttrs) throws SAXException { if (level++ == 0) { baos = new ByteArrayOutputStream(); decoder = new Base64.Decoder(1024){ protected void writeBuffer(byte[] pBytes, int pOffset, int pLen) throws IOException { baos.write(pBytes, pOffset, pLen); } }; } else { throw new SAXParseException("Unexpected start tag in atomic element: " + new QName(pURI, pLocalName), getDocumentLocator()); } } }
return new MapParser(pConfig, pContext, this); } else if (ByteArraySerializer.BASE_64_TAG.equals(pLocalName)) { return new ByteArrayParser(); } else if (StringSerializer.STRING_TAG.equals(pLocalName)) { return new StringParser();
public Object getResult() throws XmlRpcException { try { byte[] res = (byte[]) super.getResult(); ByteArrayInputStream bais = new ByteArrayInputStream(res); ObjectInputStream ois = new ObjectInputStream(bais); return ois.readObject(); } catch (IOException e) { throw new XmlRpcException("Failed to read result object: " + e.getMessage(), e); } catch (ClassNotFoundException e) { throw new XmlRpcException("Failed to load class for result object: " + e.getMessage(), e); } } }
public void startElement(String pURI, String pLocalName, String pQName, Attributes pAttrs) throws SAXException { if (level++ == 0) { baos = new ByteArrayOutputStream(); decoder = new Base64.Decoder(1024){ protected void writeBuffer(byte[] pBytes, int pOffset, int pLen) throws IOException { baos.write(pBytes, pOffset, pLen); } }; } else { throw new SAXParseException("Unexpected start tag in atomic element: " + new QName(pURI, pLocalName), getDocumentLocator()); } } }
return new MapParser(pConfig, pContext, this); } else if (ByteArraySerializer.BASE_64_TAG.equals(pLocalName)) { return new ByteArrayParser(); } else if (StringSerializer.STRING_TAG.equals(pLocalName)) { return new StringParser();
public void endElement(String pURI, String pLocalName, String pQName) throws SAXException { if (--level == 0) { try { decoder.flush(); } catch (IOException e) { throw new SAXParseException("Failed to decode base64 stream.", getDocumentLocator(), e); } setResult(baos.toByteArray()); } else { throw new SAXParseException("Unexpected end tag in atomic element: " + new QName(pURI, pLocalName), getDocumentLocator()); } }
public void characters(char[] pChars, int pStart, int pLength) throws SAXException { if (baos == null) { if (!isEmpty(pChars, pStart, pLength)) { throw new SAXParseException("Unexpected non-whitespace characters", getDocumentLocator()); } } else { try { decoder.write(pChars, pStart, pLength); } catch (IOException e) { throw new SAXParseException("Failed to decode base64 stream.", getDocumentLocator(), e); } } }
public Object getResult() throws XmlRpcException { try { byte[] res = (byte[]) super.getResult(); ByteArrayInputStream bais = new ByteArrayInputStream(res); ObjectInputStream ois = new ObjectInputStream(bais); return ois.readObject(); } catch (IOException e) { throw new XmlRpcException("Failed to read result object: " + e.getMessage(), e); } catch (ClassNotFoundException e) { throw new XmlRpcException("Failed to load class for result object: " + e.getMessage(), e); } } }
public void startElement(String pURI, String pLocalName, String pQName, Attributes pAttrs) throws SAXException { if (level++ == 0) { baos = new ByteArrayOutputStream(); decoder = new Base64.Decoder(1024){ protected void writeBuffer(byte[] pBytes, int pOffset, int pLen) throws IOException { baos.write(pBytes, pOffset, pLen); } }; } else { throw new SAXParseException("Unexpected start tag in atomic element: " + new QName(pURI, pLocalName), getDocumentLocator()); } } }
return new MapParser(pConfig, pContext, this); } else if (ByteArraySerializer.BASE_64_TAG.equals(pLocalName)) { return new ByteArrayParser(); } else if (StringSerializer.STRING_TAG.equals(pLocalName)) { return new StringParser();
public void endElement(String pURI, String pLocalName, String pQName) throws SAXException { if (--level == 0) { try { decoder.flush(); } catch (IOException e) { throw new SAXParseException("Failed to decode base64 stream.", getDocumentLocator(), e); } setResult(baos.toByteArray()); } else { throw new SAXParseException("Unexpected end tag in atomic element: " + new QName(pURI, pLocalName), getDocumentLocator()); } }
public void characters(char[] pChars, int pStart, int pLength) throws SAXException { if (baos == null) { if (!isEmpty(pChars, pStart, pLength)) { throw new SAXParseException("Unexpected non-whitespace characters", getDocumentLocator()); } } else { try { decoder.write(pChars, pStart, pLength); } catch (IOException e) { throw new SAXParseException("Failed to decode base64 stream.", getDocumentLocator(), e); } } }