List of usage examples for javax.mail.internet MimeMessage getNonMatchingHeaderLines
@Override public Enumeration<String> getNonMatchingHeaderLines(String[] names) throws MessagingException
From source file:org.apache.james.core.MimeMessageUtil.java
/** * Write the message headers to the given outputstream * /* w w w . j a v a2 s . c o m*/ * @param message * the MimeMessage to read from * @param headerOs * the OutputStream to which the headers get written * @param ignoreList * the String[] which holds headers which should be ignored * @throws MessagingException */ private static void writeHeadersTo(MimeMessage message, OutputStream headerOs, String[] ignoreList) throws MessagingException { // Write the headers (minus ignored ones) @SuppressWarnings("unchecked") Enumeration<String> headers = message.getNonMatchingHeaderLines(ignoreList); writeHeadersTo(headers, headerOs); }
From source file:org.apache.james.core.MimeMessageUtil.java
/** * Get an InputStream which holds all headers of the given MimeMessage * // ww w .ja va 2s.c om * @param message * the MimeMessage used as source * @param ignoreList * the String[] which holds headers which should be ignored * @return stream the InputStream which holds the headers * @throws MessagingException */ @SuppressWarnings("unchecked") public static InputStream getHeadersInputStream(MimeMessage message, String[] ignoreList) throws MessagingException { return new InternetHeadersInputStream(message.getNonMatchingHeaderLines(ignoreList)); }
From source file:org.apache.james.server.core.MimeMessageUtil.java
/** * Write the message headers to the given outputstream * /*from w ww . j a v a 2 s. c om*/ * @param message * the MimeMessage to read from * @param headerOs * the OutputStream to which the headers get written * @param ignoreList * the String[] which holds headers which should be ignored * @throws MessagingException */ private static void writeHeadersTo(MimeMessage message, OutputStream headerOs, String[] ignoreList) throws MessagingException { // Write the headers (minus ignored ones) Enumeration<String> headers = message.getNonMatchingHeaderLines(ignoreList); writeHeadersTo(headers, headerOs); }
From source file:org.apache.james.server.core.MimeMessageUtil.java
/** * Get an InputStream which holds all headers of the given MimeMessage * /*from ww w . j av a2 s .c om*/ * @param message * the MimeMessage used as source * @param ignoreList * the String[] which holds headers which should be ignored * @return stream the InputStream which holds the headers * @throws MessagingException */ public static InputStream getHeadersInputStream(MimeMessage message, String[] ignoreList) throws MessagingException { return new InternetHeadersInputStream(message.getNonMatchingHeaderLines(ignoreList)); }