|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.core.MimeMessageUtil
Utility class to provide optimized write methods for the various MimeMessage implementations.
Constructor Summary | |
MimeMessageUtil()
|
Method Summary | |
static long |
calculateMessageSize(MimeMessage message)
|
static void |
copyStream(InputStream in,
OutputStream out)
Convenience method to copy streams |
static InputStream |
getHeadersInputStream(MimeMessage message,
String[] ignoreList)
|
static long |
getMessageSize(MimeMessage message)
|
static void |
writeHeadersTo(Enumeration headers,
OutputStream headerOs)
Write the message headers to the given outputstream |
static void |
writeMessageBodyTo(MimeMessage message,
OutputStream bodyOs)
|
static void |
writeTo(MimeMessage message,
OutputStream headerOs,
OutputStream bodyOs)
Convenience method to take any MimeMessage and write the headers and body to two different output streams |
static void |
writeTo(MimeMessage message,
OutputStream headerOs,
OutputStream bodyOs,
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(MimeMessage message,
OutputStream headerOs,
OutputStream bodyOs,
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(MimeMessage message, OutputStream headerOs, OutputStream bodyOs) throws IOException, MessagingException
IOException
MessagingException
public static void writeTo(MimeMessage message, OutputStream headerOs, OutputStream bodyOs, String[] ignoreList) throws IOException, MessagingException
IOException
MessagingException
public static void writeToInternal(MimeMessage message, OutputStream headerOs, OutputStream bodyOs, String[] ignoreList) throws MessagingException, IOException, UnsupportedDataTypeException
message
- headerOs
- bodyOs
- ignoreList
-
MessagingException
IOException
UnsupportedDataTypeException
public static void writeMessageBodyTo(MimeMessage message, OutputStream bodyOs) throws IOException, UnsupportedDataTypeException, MessagingException
IOException
UnsupportedDataTypeException
MessagingException
public static void copyStream(InputStream in, OutputStream out) throws IOException
IOException
public static void writeHeadersTo(Enumeration headers, OutputStream headerOs) throws MessagingException
headerOs
-
MessagingException
public static InputStream getHeadersInputStream(MimeMessage message, String[] ignoreList) throws MessagingException
message
- ignoreList
-
MessagingException
public static long getMessageSize(MimeMessage message) throws MessagingException
MessagingException
- if a problem occours while computing the message sizepublic static long calculateMessageSize(MimeMessage message) throws MessagingException
message
-
MessagingException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |