public interface Attachment
Modifier and Type | Method and Description |
---|---|
byte[] |
asByteArray()
Gets the attachment as an exact-length byte array.
|
javax.activation.DataHandler |
asDataHandler()
Gets the attachment as a
DataHandler . |
InputStream |
asInputStream()
Obtains this attachment as an
InputStream . |
Source |
asSource()
Gets the attachment as a
Source . |
String |
getContentId()
Content ID of the attachment.
|
String |
getContentType()
Gets the MIME content-type of this attachment.
|
void |
writeTo(OutputStream os)
Writes the contents of the attachment into the given stream.
|
void |
writeTo(javax.xml.soap.SOAPMessage saaj)
Writes this attachment to the given
SOAPMessage . |
@NotNull String getContentId()
String getContentType()
byte[] asByteArray()
javax.activation.DataHandler asDataHandler()
DataHandler
.Source asSource()
Source
.
Note that there's no guarantee that the attachment is actually an XML.InputStream asInputStream()
InputStream
.void writeTo(OutputStream os) throws IOException
IOException
void writeTo(javax.xml.soap.SOAPMessage saaj) throws javax.xml.soap.SOAPException
SOAPMessage
.javax.xml.soap.SOAPException
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.