org.codehaus.xfire.attachments
Class JavaMailAttachments

java.lang.Object
  extended by org.codehaus.xfire.attachments.JavaMailAttachments
All Implemented Interfaces:
Attachments

public class JavaMailAttachments
extends java.lang.Object
implements Attachments

Author:
Dan Diephouse

Constructor Summary
JavaMailAttachments()
           
JavaMailAttachments(java.io.InputStream is, java.lang.String contentType)
           
JavaMailAttachments(javax.mail.internet.MimeMultipart multipart)
          Create Attachments from the MimeMultipart message.
 
Method Summary
 void addPart(Attachment part)
           
 void dispose()
           
 java.lang.String getContentType()
          Get the conetnt type of the whole message.
 javax.mail.internet.MimeMultipart getMimeMultipart()
           
 Attachment getPart(java.lang.String id)
           
 java.util.Iterator getParts()
           
 java.lang.String getSoapContentType()
          The Content-Type of the SOAP message part.
 Attachment getSoapMessage()
           
 void setSoapContentType(java.lang.String soapContentType)
          Set the content type of the soap message.
 void setSoapMessage(Attachment soapMessage)
           
 int size()
           
 void write(java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaMailAttachments

public JavaMailAttachments()

JavaMailAttachments

public JavaMailAttachments(java.io.InputStream is,
                           java.lang.String contentType)
                    throws javax.mail.MessagingException,
                           java.io.IOException
Throws:
javax.mail.MessagingException
java.io.IOException

JavaMailAttachments

public JavaMailAttachments(javax.mail.internet.MimeMultipart multipart)
                    throws javax.mail.MessagingException
Create Attachments from the MimeMultipart message.

Parameters:
multipart -
Throws:
javax.mail.MessagingException
Method Detail

getSoapMessage

public Attachment getSoapMessage()
Specified by:
getSoapMessage in interface Attachments
Returns:
Returns the soapMessage.

setSoapMessage

public void setSoapMessage(Attachment soapMessage)
Specified by:
setSoapMessage in interface Attachments
Parameters:
soapMessage - The soapMessage to set.

addPart

public void addPart(Attachment part)
Specified by:
addPart in interface Attachments

getParts

public java.util.Iterator getParts()
Specified by:
getParts in interface Attachments

getPart

public Attachment getPart(java.lang.String id)
Specified by:
getPart in interface Attachments

size

public int size()
Specified by:
size in interface Attachments

write

public void write(java.io.OutputStream out)
           throws java.io.IOException
Specified by:
write in interface Attachments
Throws:
java.io.IOException

getMimeMultipart

public javax.mail.internet.MimeMultipart getMimeMultipart()

getContentType

public java.lang.String getContentType()
Description copied from interface: Attachments
Get the conetnt type of the whole message.

Specified by:
getContentType in interface Attachments
Returns:

getSoapContentType

public java.lang.String getSoapContentType()
The Content-Type of the SOAP message part.

Specified by:
getSoapContentType in interface Attachments
Returns:

setSoapContentType

public void setSoapContentType(java.lang.String soapContentType)
Description copied from interface: Attachments
Set the content type of the soap message.

Specified by:
setSoapContentType in interface Attachments

dispose

public void dispose()


Copyright © 2004-2008. All Rights Reserved.