List of usage examples for javax.mail BodyPart getMatchingHeaders
public Enumeration<Header> getMatchingHeaders(String[] header_names) throws MessagingException;
From source file:org.sourceforge.net.javamail4ews.transport.EwsTransport.java
@SuppressWarnings("unchecked") private String getFirstHeaderValue(BodyPart part, String pKey) throws MessagingException { Enumeration<Header> lMatchingHeaders = part.getMatchingHeaders(new String[] { pKey }); if (lMatchingHeaders.hasMoreElements()) { Header lHeader = lMatchingHeaders.nextElement(); String lValue = lHeader.getValue(); return lValue; }//from w ww. j a va2 s.co m return null; }