private Enumeration<String> enumerateHeaderLines(boolean match, String[] names) {
   List<String> jmheaders = new ArrayList<String>();
   for (com.zimbra.common.mime.MimeHeader header : zheaders) {
     int i = 0;
     for (; i < names.length; i++) {
       if (header.getName().equalsIgnoreCase(names[i])) {
         break;
       }
     }
     if (match == (i != names.length)) {
       jmheaders.add(new String(header.getRawHeader()).trim());
     }
   }
   return new IteratorEnumeration<String>(jmheaders);
 }
 @Override
 public String[] getHeader(String name) {
   if (ZPARSER) {
     List<com.zimbra.common.mime.MimeHeader> matches = zheaders.getAll(name);
     if (matches == null || matches.isEmpty()) {
       return null;
     } else {
       int i = 0;
       String[] values = new String[matches.size()];
       for (com.zimbra.common.mime.MimeHeader header : matches) {
         values[i++] = header.getEncodedValue(defaultCharset);
       }
       return values;
     }
   } else {
     return super.getHeader(name);
   }
 }
 private Enumeration<Header> enumerateHeaders(boolean match, String[] names) {
   if (names == null) {
     names = NO_HEADERS;
   }
   List<InternetHeader> jmheaders = new ArrayList<InternetHeader>();
   for (com.zimbra.common.mime.MimeHeader header : zheaders) {
     int i = 0;
     for (; i < names.length; i++) {
       if (header.getName().equalsIgnoreCase(names[i])) {
         break;
       }
     }
     if (match == (i != names.length)) {
       jmheaders.add(new InternetHeader(header.getName(), header.getValue(defaultCharset)));
     }
   }
   return new IteratorEnumeration<Header>(jmheaders);
 }