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()); } } }
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()); } } }
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()); } } }
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 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 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 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); } } }