获取标题与字段值对应的Map

@return an unmodifiable map of header names and field values of this row
@throws IllegalStateException CSV文件无标题行抛出此异常
968312
public Map<String, String> getFieldMap() {
		if (headerMap == null) {
			throw new IllegalStateException("No header available");
		}

		final Map<String, String> fieldMap = new LinkedHashMap<>(headerMap.size());
		String key;
		Integer col;
		String val;
		for (final Map.Entry<String, Integer> header : headerMap.entrySet()) {
			key = header.getKey();
			col = headerMap.get(key);
			val = null == col ? null : get(col);
			fieldMap.put(key, val);
		}

		return fieldMap;
	}
1082124
public Map<String, String> getCustomRequestHeaders() {
        if (customRequestHeaders == null) {
            return null;
        }
        return Collections.unmodifiableMap(customRequestHeaders);
    }
207617
@Override
    public Map<String, Object> getValuesMap() throws AtlasException {
        Map<String, Object> m = new HashMap<>();
        for (String attr : fieldMapping.fields.keySet()) {
//            int pos = fieldMapping.fieldNullPos.get(attr);
//            if (  explicitSets[pos] ) {
                m.put(attr, get(attr));
//            }
        }
        return m;
    }
104865
public List<String> getCSV(HttpHeader header, boolean keepQuotes) {
        QuotedCSV values = null;
        for (HttpField f : this) {
            if (f.getHeader() == header) {
                if (values == null)
                    values = new QuotedCSV(keepQuotes);
                values.addValue(f.getValue());
            }
        }
        return values == null ? Collections.emptyList() : values.getValues();
    }
783947
public Map<String, String> verifyAndGet() {
        for (String paramName : required) {
            if (params.get(paramName) == null) {
                throw new IllegalStateException(format("Param %s is required but has not been supplied", paramName));
            }
        }
        return params;
    }
555605
public Map<String, String> getCustomFields() {
        Map<String, String> fields = new HashMap<String, String>();
        for (CustomField f : customFields) {
            fields.put(f.getName(), f.getValue());
        }
        return fields;
    }
536511
public Map<String, List<String>> getHeaders() {
        if (headers == null) {
            return null;
        }
        return headers.toMultimap();
    }
605650
public Map<String, String> createHeadersFromString(String headersAndValues) {

    if (headersAndValues == null || headersAndValues.isEmpty()) return Collections.emptyMap();

    final StringTokenizer token = new StringTokenizer(headersAndValues, "@");

    final Map<String, String> theHeaders = new HashMap<String, String>(token.countTokens());

    while (token.hasMoreTokens()) {
      final String headerAndValue = token.nextToken();
      if (!headerAndValue.contains(":"))
        throw new IllegalArgumentException(
            "Request headers wrongly configured, missing separator :" + headersAndValues);

      final String header = headerAndValue.substring(0, headerAndValue.indexOf(":"));
      final String value =
          headerAndValue.substring(headerAndValue.indexOf(":") + 1, headerAndValue.length());
      theHeaders.put(header, value);
    }

    return theHeaders;

  }
314049
public Map<File, FileInfo> getFileInfoMap() {
        final Map<File, FileInfo> ret = new HashMap<>();
        for (final Map.Entry<URI, FileInfo> e: files.entrySet()) {
            ret.put(e.getValue().file, e.getValue());
        }
        return Collections.unmodifiableMap(ret);
    }
896538
public final HldCnvToColumnsValuesNames
    lazyGetHldCnvToColumnsValuesNames() throws Exception {
    String beanName = getHldCnvToColumnsValuesNamesName();
    HldCnvToColumnsValuesNames hldCnvToColumnsValuesNames =
      (HldCnvToColumnsValuesNames) this.beansMap.get(beanName);
    if (hldCnvToColumnsValuesNames == null) {
      hldCnvToColumnsValuesNames = new HldCnvToColumnsValuesNames();
      hldCnvToColumnsValuesNames.setFieldsRapiHolder(lazyGetHolderRapiFields());
      this.beansMap.put(beanName, hldCnvToColumnsValuesNames);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return hldCnvToColumnsValuesNames;
  }
615148
public List<String> getQualityCSV(HttpHeader header) {
        QuotedQualityCSV values = null;
        for (HttpField f : this) {
            if (f.getHeader() == header) {
                if (values == null)
                    values = new QuotedQualityCSV();
                values.addValue(f.getValue());
            }
        }

        return values == null ? Collections.emptyList() : values.getValues();
    }
540868
public Map<String, String> getPrintableHeaders() {
    final Map<String, String> headers = new HashMap<String, String>(
        request.headers().entries().size());
    for (final Entry<String, String> header : request.headers().entries()) {
      if (header.getKey().toLowerCase().equals("cookie")) {
        // null out the cookies
        headers.put(header.getKey(), "*******");
      } else {
        // http://tools.ietf.org/html/rfc2616#section-4.2
        if (headers.containsKey(header.getKey())) {
          headers.put(header.getKey(), 
              headers.get(header.getKey()) + "," + header.getValue());
        } else {
          headers.put(header.getKey(), header.getValue());
        }
      }
    }
    return headers;
  }
551075
public static Map<String, String> headers(){
        Map<String, String> headers = new HashMap<>();
        Enumeration<String> names = RequestContext.getHttpRequest().getHeaderNames();
        while (names.hasMoreElements()) {
            String name = names.nextElement();
            headers.put(name, RequestContext.getHttpRequest().getHeader(name));
        }
        return headers;
    }
912674
public Map<String, TemplateTokenInfo> getTokensAsMap() {
        HashMap<String, TemplateTokenInfo> tokens = new HashMap<String, TemplateTokenInfo>();
        for (TemplateTokenInfo tokenInfo : tokenInfos)
            tokens.put(tokenInfo.getName(), tokenInfo);
        return Collections.unmodifiableMap(tokens);
    }
738426
public Map<String,String> data() {
		try {
			return event().get();
		} catch (InterruptedException e) {
			// Can only happen if invoked before completion
			throw new IllegalStateException(e);
		}
	}
156277
public static Headers of(Map<String, String> headers) {
        if (headers == null) throw new NullPointerException("headers == null");

        // Make a defensive copy and clean it up.
        String[] namesAndValues = new String[headers.size() * 2];
        int i = 0;
        for (Map.Entry<String, String> header : headers.entrySet()) {
            if (header.getKey() == null || header.getValue() == null) {
                throw new IllegalArgumentException("Headers cannot be null");
            }
            String name = header.getKey().trim();
            String value = header.getValue().trim();
            if (name.length() == 0 || name.indexOf('\0') != -1 || value.indexOf('\0') != -1) {
                throw new IllegalArgumentException("Unexpected header: " + name + ": " + value);
            }
            namesAndValues[i] = name;
            namesAndValues[i + 1] = value;
            i += 2;
        }

        return new Headers(namesAndValues);
    }
799756
private Map<FieldDescriptor, Object> getAllFieldsMutable() {
    final TreeMap<FieldDescriptor, Object> result =
      new TreeMap<FieldDescriptor, Object>();
    final Descriptor descriptor = internalGetFieldAccessorTable().descriptor;
    for (final FieldDescriptor field : descriptor.getFields()) {
      if (field.isRepeated()) {
        final List<?> value = (List<?>) getField(field);
        if (!value.isEmpty()) {
          result.put(field, value);
        }
      } else {
        if (hasField(field)) {
          result.put(field, getField(field));
        }
      }
    }
    return result;
  }