List of usage examples for javax.mail.internet MimePart getAllHeaders
public Enumeration<Header> getAllHeaders() throws MessagingException;
From source file:org.simplejavamail.internal.util.MimeMessageParser.java
private void extractCustomUserHeaders(final MimePart part) throws MessagingException { final Enumeration e = part.getAllHeaders(); while (e.hasMoreElements()) { final Object headerObj = e.nextElement(); if (headerObj instanceof Header) { final Header header = (Header) headerObj; if (isCustomUserHeader(header)) { headers.put(header.getName(), header.getValue()); }/*from w w w .j a v a 2s . c om*/ } } }