static class MimeMultipartParser.PartAttachment extends Object implements AttachmentEx
AttachmentEx.MimeHeader| Modifier and Type | Field and Description |
|---|---|
(package private) byte[] |
buf |
(package private) org.jvnet.mimepull.MIMEPart |
part |
| Constructor and Description |
|---|
MimeMultipartParser.PartAttachment(org.jvnet.mimepull.MIMEPart part) |
| 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.
|
Iterator<AttachmentEx.MimeHeader> |
getMimeHeaders()
Iterator of custom MIME headers associated with 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. |
MimeMultipartParser.PartAttachment(org.jvnet.mimepull.MIMEPart part)
@NotNull public String getContentId()
AttachmentgetContentId in interface Attachment@NotNull public String getContentType()
AttachmentgetContentType in interface Attachmentpublic byte[] asByteArray()
AttachmentasByteArray in interface Attachmentpublic javax.activation.DataHandler asDataHandler()
AttachmentDataHandler.asDataHandler in interface Attachmentpublic Source asSource()
AttachmentSource.
Note that there's no guarantee that the attachment is actually an XML.asSource in interface Attachmentpublic InputStream asInputStream()
AttachmentInputStream.asInputStream in interface Attachmentpublic void writeTo(OutputStream os) throws IOException
AttachmentwriteTo in interface AttachmentIOExceptionpublic void writeTo(javax.xml.soap.SOAPMessage saaj) throws javax.xml.soap.SOAPException
AttachmentSOAPMessage.writeTo in interface Attachmentjavax.xml.soap.SOAPExceptionpublic Iterator<AttachmentEx.MimeHeader> getMimeHeaders()
AttachmentExgetMimeHeaders in interface AttachmentExCopyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.