Replaces all of the headers with the these headers.

@param headers the new headers to be used, {@code null} to remove all existing headers
@return this builder
164637
public GenericResponseBuilder<T> replaceAll(MultivaluedMap<String, Object> headers) {
    rawBuilder.replaceAll(headers);
    return this;
  }
664941
public HttpResponse replaceHeader(String name, String... values) {
        this.headers.replaceEntry(name, values);
        return this;
    }
1062941
public static void addHeaders(BoundRequestBuilder builder,
            Map<String, String> headerMap) {
        for (Entry<String, String> entry : headerMap.entrySet()) {
            String name = entry.getKey();
            String value = entry.getValue();
            builder.addHeader(name, value);
        }

    }
259357
@Deprecated
  public ResponseMessageBuilder headers(Map<String, ModelReference> headers) {
    this.headers.putAll(nullToEmptyMap(headers).entrySet().stream()
        .map(toHeaderEntry())
        .collect(toMap(Map.Entry::getKey, Map.Entry::getValue)));
    return this;
  }
536997
private static HttpBuilder defaults(HttpBuilder builder) {
		if (defaultTimeout != null) {
			builder.timeout(defaultTimeout);
		}
		if (defaultTimeoutConnection != null) {
			builder.timeoutConnection(defaultTimeoutConnection);
		}
		if (defaultTimeoutRead != null) {
			builder.timeoutRead(defaultTimeoutRead);
		}
		if (defaultHeader != null) {
			builder.headers(defaultHeader);
		}
		return builder;
	}
294193
public AnnotationValueBuilder<T> member(String name, @Nullable AnnotationValue<?>... annotations) {
        if (annotations != null) {
            values.put(name, annotations);
        }
        return this;
    }
964743
public GenericResponseBuilder<T> header(String name, Object value) {
    rawBuilder.header(name, value);
    return this;
  }
958616
public DocServiceBuilder exampleHttpHeaders(HttpHeaders... exampleHttpHeaders) {
        requireNonNull(exampleHttpHeaders, "exampleHttpHeaders");
        return exampleHttpHeaders(ImmutableList.copyOf(exampleHttpHeaders));
    }
665679
void setHeaders(Map<String, String> headers) {
    this.headers = Collections.unmodifiableMap(new HashMap<>(headers));
  }
1166007
public java.util.List<? extends com.google.privacy.dlp.v2.FieldIdOrBuilder>
      getHeadersOrBuilderList() {
    return headers_;
  }
765369
public CustomHeadersInterceptor addHeaderMultimap(Map<String, List<String>> headers) {
        this.headers.putAll(headers);
        return this;
    }
485929
public CustomHeadersInterceptor addHeaderMap(Map<String, String> headers) {
        for (Map.Entry<String, String> header : headers.entrySet()) {
            this.headers.put(header.getKey(), Collections.singletonList(header.getValue()));
        }
        return this;
    }
309114
public AnnotationValueBuilder<T> member(String name, @Nullable AnnotationClassValue<?>... classValues) {
        if (classValues != null) {
            values.put(name, classValues);
        }
        return this;
    }
902089
public void setDefaultHeaders(Collection<? extends Header> defaultHeaders) {
        Collection<BasicHeader> copiedHeaders = new HashSet<>();
        for (Header header : defaultHeaders) {
            copiedHeaders.add(new BasicHeader(header.getName(), header.getValue()));
        }
        this.defaultHeaders = copiedHeaders;
    }
219052
public HttpFileServiceBuilder addHeaders(Headers<AsciiString, String, ?> headers) {
        requireNonNull(headers, "headers");
        getOrCreateHeaders().add(headers);
        return this;
    }
1084015
private void replaceHeaders(URLRewritingConfig config, HeaderMap headers) {
        for (Entry<String, String> entry : headers) {
            String key = entry.getKey();
            String value = entry.getValue();
            value = doHeaderReplaceAll(value, config.getFromRegex(), config.getToReplacement());
            if (value != null) {
                headers.put(key, value);
            }
        }
    }
536511
public Map<String, List<String>> getHeaders() {
        if (headers == null) {
            return null;
        }
        return headers.toMultimap();
    }