org.apache.camel.component.mail
Class MailConverters

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

@Converter
public final class MailConverters
extends Object

JavaMail specific converters.

Version:

Method Summary
static InputStream toInputStream(Message message)
          Converts the given JavaMail message to an InputStream.
static InputStream toInputStream(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 String toString(Message message)
          Converts the given JavaMail message to a String body.
static String toString(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 String toString(Message message)
                       throws MessagingException,
                              IOException
Converts the given JavaMail message to a String body. Can return null.

Throws:
MessagingException
IOException

toString

@Converter
public static String toString(Multipart multipart)
                       throws MessagingException,
                              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:
MessagingException
IOException

toInputStream

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

Throws:
IOException
MessagingException

toInputStream

@Converter
public static InputStream toInputStream(Multipart multipart)
                                 throws IOException,
                                        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:
IOException
MessagingException


Apache CAMEL