/** * Reads the base64 element value. * * @param outputStream the output stream * @throws Exception the exception */ public void readBase64ElementValue(OutputStream outputStream) throws Exception { this.ensureCurrentNodeIsStartElement(); byte[] buffer = null; buffer = Base64.decodeBase64(this.xmlReader.getElementText().toString()); outputStream.write(buffer); outputStream.flush(); }
/** * Reads the base64 element value. * * @return byte[] * @throws ServiceXmlDeserializationException the service xml deserialization exception * @throws XMLStreamException the XML stream exception * @throws IOException signals that an I/O exception has occurred */ public byte[] readBase64ElementValue() throws ServiceXmlDeserializationException, XMLStreamException, IOException { this.ensureCurrentNodeIsStartElement(); byte[] buffer = null; ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream(); buffer = Base64.decodeBase64(this.xmlReader.getElementText().toString()); byteArrayStream.write(buffer); return byteArrayStream.toByteArray(); }
/** * Read element value. * * @param <T> the generic type * @param cls the cls * @return T * @throws Exception the exception */ public <T> T readElementValue(Class<T> cls) throws Exception { this.ensureCurrentNodeIsStartElement(); T value = null; if (!this.isEmptyElement()) { value = this.readValue(cls); } return value; }
/** * Read element value. * * @return String * @throws Exception the exception */ public String readElementValue() throws Exception { this.ensureCurrentNodeIsStartElement(); return this.readElementValue(this.getNamespacePrefix(), this .getLocalName()); }
/** * Reads the base64 element value. * * @param outputStream the output stream * @throws Exception the exception */ public void readBase64ElementValue(OutputStream outputStream) throws Exception { this.ensureCurrentNodeIsStartElement(); byte[] buffer = null; buffer = Base64.decodeBase64(this.xmlReader.getElementText().toString()); outputStream.write(buffer); outputStream.flush(); }
/** * Reads the base64 element value. * * @return byte[] * @throws ServiceXmlDeserializationException the service xml deserialization exception * @throws XMLStreamException the XML stream exception * @throws IOException signals that an I/O exception has occurred */ public byte[] readBase64ElementValue() throws ServiceXmlDeserializationException, XMLStreamException, IOException { this.ensureCurrentNodeIsStartElement(); byte[] buffer = null; ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream(); buffer = Base64.decodeBase64(this.xmlReader.getElementText().toString()); byteArrayStream.write(buffer); return byteArrayStream.toByteArray(); }
/** * Read element value. * * @param <T> the generic type * @param cls the cls * @return T * @throws Exception the exception */ public <T> T readElementValue(Class<T> cls) throws Exception { this.ensureCurrentNodeIsStartElement(); T value = null; if (!this.isEmptyElement()) { value = this.readValue(cls); } return value; }
/** * Read element value. * * @return String * @throws Exception the exception */ public String readElementValue() throws Exception { this.ensureCurrentNodeIsStartElement(); return this.readElementValue(this.getNamespacePrefix(), this .getLocalName()); }