|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.james.core.MimeMessageUtil
public class MimeMessageUtil
Utility class to provide optimized write methods for the various MimeMessage implementations.
Constructor Summary | |
---|---|
MimeMessageUtil()
|
Method Summary | |
---|---|
static long |
calculateMessageSize(javax.mail.internet.MimeMessage message)
|
static void |
copyStream(java.io.InputStream in,
java.io.OutputStream out)
Convenience method to copy streams |
static java.io.InputStream |
getHeadersInputStream(javax.mail.internet.MimeMessage message,
java.lang.String[] ignoreList)
|
static long |
getMessageSize(javax.mail.internet.MimeMessage message)
|
static void |
writeHeadersTo(java.util.Enumeration headers,
java.io.OutputStream headerOs)
Write the message headers to the given outputstream |
static void |
writeMessageBodyTo(javax.mail.internet.MimeMessage message,
java.io.OutputStream bodyOs)
|
static void |
writeTo(javax.mail.internet.MimeMessage message,
java.io.OutputStream headerOs,
java.io.OutputStream bodyOs)
Convenience method to take any MimeMessage and write the headers and body to two different output streams |
static void |
writeTo(javax.mail.internet.MimeMessage message,
java.io.OutputStream headerOs,
java.io.OutputStream bodyOs,
java.lang.String[] ignoreList)
Convenience method to take any MimeMessage and write the headers and body to two different output streams, with an ignore list |
static void |
writeToInternal(javax.mail.internet.MimeMessage message,
java.io.OutputStream headerOs,
java.io.OutputStream bodyOs,
java.lang.String[] ignoreList)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MimeMessageUtil()
Method Detail |
---|
public static void writeTo(javax.mail.internet.MimeMessage message, java.io.OutputStream headerOs, java.io.OutputStream bodyOs) throws java.io.IOException, javax.mail.MessagingException
java.io.IOException
javax.mail.MessagingException
public static void writeTo(javax.mail.internet.MimeMessage message, java.io.OutputStream headerOs, java.io.OutputStream bodyOs, java.lang.String[] ignoreList) throws java.io.IOException, javax.mail.MessagingException
java.io.IOException
javax.mail.MessagingException
public static void writeToInternal(javax.mail.internet.MimeMessage message, java.io.OutputStream headerOs, java.io.OutputStream bodyOs, java.lang.String[] ignoreList) throws javax.mail.MessagingException, java.io.IOException, javax.activation.UnsupportedDataTypeException
message
- headerOs
- bodyOs
- ignoreList
-
javax.mail.MessagingException
java.io.IOException
javax.activation.UnsupportedDataTypeException
public static void writeMessageBodyTo(javax.mail.internet.MimeMessage message, java.io.OutputStream bodyOs) throws java.io.IOException, javax.activation.UnsupportedDataTypeException, javax.mail.MessagingException
java.io.IOException
javax.activation.UnsupportedDataTypeException
javax.mail.MessagingException
public static void copyStream(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static void writeHeadersTo(java.util.Enumeration headers, java.io.OutputStream headerOs) throws javax.mail.MessagingException
message
- headerOs
- ignoreList
-
javax.mail.MessagingException
public static java.io.InputStream getHeadersInputStream(javax.mail.internet.MimeMessage message, java.lang.String[] ignoreList) throws javax.mail.MessagingException
message
- ignoreList
-
javax.mail.MessagingException
public static long getMessageSize(javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
javax.mail.MessagingException
- if a problem occours while computing the message sizepublic static long calculateMessageSize(javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
message
-
javax.mail.MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |