code: public static Map<String, Object> getHeaders(Bundle b) {
  	Dictionary<String, String> headers = b.getHeaders();
  	Enumeration<String> keys = headers.keys();
  	Enumeration<String> values = headers.elements();
  
  	String key, value;
  	Object existing;
  	List<String> list;
  	Map<String, Object> _headers = new HashMap<String, Object>();
  	while (keys.hasMoreElements()) {
  	    key = keys.nextElement();
  	    value = StringUtil.unwrap(values.nextElement());
  	    existing = _headers.get(key);
  	    if (existing != null) {
  		if (existing instanceof String) {
  		    list = new ArrayList<>();
  		    list.add((String) existing);
  		    _headers.put(key, list);
  		}
  		else list = (List<String>) existing;
  		list.add(value);
  	    }
  	    else _headers.put(key, value);
  	}
  
  	return _headers;
      }
docs: value can be a String (for a single entry) or a List<String> for multiple entries
  
  @param b
  @return