@Converter public final class MailConverters extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
convertTo(Class<T> type,
org.apache.camel.Exchange exchange,
Object value,
org.apache.camel.spi.TypeConverterRegistry registry)
Converts a JavaMail multipart into a body of any type a String can be
converted into.
|
static InputStream |
toInputStream(javax.mail.Message message)
Converts the given JavaMail message to an InputStream.
|
static InputStream |
toInputStream(javax.mail.Multipart multipart,
org.apache.camel.Exchange exchange)
Converts the given JavaMail multipart to a InputStream body, where the content-type of the multipart
must be text based (ie start with text).
|
static javax.mail.search.SearchTerm |
toSearchTerm(SimpleSearchTerm simple,
org.apache.camel.TypeConverter typeConverter)
Converters the simple search term builder to search term.
|
static com.sun.mail.imap.SortTerm[] |
toSortTerm(String sortTerm) |
static String |
toString(javax.mail.Message message)
Converts the given JavaMail message to a String body.
|
static String |
toString(javax.mail.Multipart multipart)
Converts the given JavaMail multipart to a String body, where the content-type of the multipart
must be text based (ie start with text).
|
@Converter public static String toString(javax.mail.Message message) throws javax.mail.MessagingException, IOException
javax.mail.MessagingException
IOException
@Converter public static String toString(javax.mail.Multipart multipart) throws javax.mail.MessagingException, IOException
javax.mail.MessagingException
IOException
@Converter public static InputStream toInputStream(javax.mail.Message message) throws IOException, javax.mail.MessagingException
IOException
javax.mail.MessagingException
@Converter public static InputStream toInputStream(javax.mail.Multipart multipart, org.apache.camel.Exchange exchange) throws IOException, javax.mail.MessagingException
IOException
javax.mail.MessagingException
@FallbackConverter public static <T> T convertTo(Class<T> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.spi.TypeConverterRegistry registry) throws javax.mail.MessagingException, IOException
javax.mail.MessagingException
IOException
public static javax.mail.search.SearchTerm toSearchTerm(SimpleSearchTerm simple, org.apache.camel.TypeConverter typeConverter) throws ParseException, org.apache.camel.NoTypeConversionAvailableException
ParseException
org.apache.camel.NoTypeConversionAvailableException
public static com.sun.mail.imap.SortTerm[] toSortTerm(String sortTerm)
Apache Camel