/** * Gets the attachment as a {@link javax.xml.transform.Source}. * Note that there's no guarantee that the attachment is actually an XML. */ public Source asSource() { try { return new StreamSource(ap.getRawContent()); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Obtains this attachment as an {@link java.io.InputStream}. */ public InputStream asInputStream() { try { return ap.getRawContent(); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Gets the attachment as a {@link javax.xml.transform.Source}. * Note that there's no guarantee that the attachment is actually an XML. */ public Source asSource() { try { return new StreamSource(ap.getRawContent()); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Obtains this attachment as an {@link java.io.InputStream}. */ public InputStream asInputStream() { try { return ap.getRawContent(); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Gets the attachment as a {@link javax.xml.transform.Source}. * Note that there's no guarantee that the attachment is actually an XML. */ public Source asSource() { try { return new StreamSource(ap.getRawContent()); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Obtains this attachment as an {@link java.io.InputStream}. */ public InputStream asInputStream() { try { return ap.getRawContent(); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Writes the contents of the attachment into the given stream. */ public void writeTo(OutputStream os) throws IOException { try { ASCIIUtility.copyStream(ap.getRawContent(), os); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Writes the contents of the attachment into the given stream. */ public void writeTo(OutputStream os) throws IOException { try { ASCIIUtility.copyStream(ap.getRawContent(), os); } catch (SOAPException e) { throw new WebServiceException(e); } }
/** * Writes the contents of the attachment into the given stream. */ public void writeTo(OutputStream os) throws IOException { try { ASCIIUtility.copyStream(ap.getRawContent(), os); } catch (SOAPException e) { throw new WebServiceException(e); } }