org.apache.camel.component.mail
Class MailConverters

java.lang.Object
  extended by org.apache.camel.component.mail.MailConverters

@Converter
public final class MailConverters
extends java.lang.Object

JavaMail specific converters.

Version:

Method Summary
static java.io.InputStream toInputStream(javax.mail.Message message)
          Converts the given JavaMail message to an InputStream.
static java.io.InputStream toInputStream(javax.mail.Multipart multipart)
          Converts the given JavaMail multipart to a InputStream body, where the contenttype of the multipart must be text based (ie start with text).
static java.lang.String toString(javax.mail.Message message)
          Converts the given JavaMail message to a String body.
static java.lang.String toString(javax.mail.Multipart multipart)
          Converts the given JavaMail multipart to a String body, where the contenttype of the multipart must be text based (ie start with text).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toString

@Converter
public static java.lang.String toString(javax.mail.Message message)
                                 throws javax.mail.MessagingException,
                                        java.io.IOException
Converts the given JavaMail message to a String body. Can return null.

Throws:
javax.mail.MessagingException
java.io.IOException

toString

@Converter
public static java.lang.String toString(javax.mail.Multipart multipart)
                                 throws javax.mail.MessagingException,
                                        java.io.IOException
Converts the given JavaMail multipart to a String body, where the contenttype of the multipart must be text based (ie start with text). Can return null.

Throws:
javax.mail.MessagingException
java.io.IOException

toInputStream

@Converter
public static java.io.InputStream toInputStream(javax.mail.Message message)
                                         throws java.io.IOException,
                                                javax.mail.MessagingException
Converts the given JavaMail message to an InputStream.

Throws:
java.io.IOException
javax.mail.MessagingException

toInputStream

@Converter
public static java.io.InputStream toInputStream(javax.mail.Multipart multipart)
                                         throws java.io.IOException,
                                                javax.mail.MessagingException
Converts the given JavaMail multipart to a InputStream body, where the contenttype of the multipart must be text based (ie start with text). Can return null.

Throws:
java.io.IOException
javax.mail.MessagingException


Apache CAMEL