HeaderFields.put
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.yahoo.jdisc.HeaderFields.put(Showing top 14 results out of 315)

origin: com.yahoo.vespa/jdisc_core

@Override
public void putAll(Map<? extends String, ? extends List<String>> values) {
  for (Entry<? extends String, ? extends List<String>> entry : values.entrySet()) {
    put(entry.getKey(), entry.getValue());
  }
}
origin: com.yahoo.vespa/container-core

private void addResponseHeaders(HttpResponse httpResponse, long startTime) {
  if ( ! httpResponse.headers().containsKey(CONTENT_TYPE) && httpResponse.getContentType() != null) {
    StringBuilder s = new StringBuilder(httpResponse.getContentType());
    if (httpResponse.getCharacterEncoding() != null) {
      s.append("; charset=").append(httpResponse.getCharacterEncoding());
    }
    httpResponse.headers().put(CONTENT_TYPE, s.toString());
  }
  addDateHeader(httpResponse, startTime);
}
origin: com.yahoo.vespa/application

/**
 * <p>Convenience method to call {@link #put(String, List)} with a singleton list that contains the specified
 * value.</p>
 *
 * @param key   The key of the entry to put.
 * @param value The value to put.
 * @return The previous value associated with <tt>key</tt>, or <tt>null</tt> if there was no mapping for
 *         <tt>key</tt>.
 */
public List<String> put(String key, String value) {
  return h.put(key, value);
}
origin: com.yahoo.vespa/application

@Override
public List<String> put(String key, List<String> value) {
  return h.put(key, value);
}
origin: com.yahoo.vespa/jdisc_http_service

public void encodeCookieHeader(List<Cookie> cookies) {
  headers().put(HttpHeaders.Names.COOKIE, Cookie.toCookieHeader(cookies));
}
origin: com.yahoo.vespa/jdisc_core

/**
 * <p>Adds the given values to the entry of the specified key. If no entry exists for the given key, a new one is
 * created containing only the given values.</p>
 *
 * @param key    The key with which the specified value is to be associated.
 * @param values The values to be added to the list associated with the specified key.
 */
public void add(String key, List<String> values) {
  List<String> lst = content.get(key);
  if (lst != null) {
    lst.addAll(values);
  } else {
    put(key, values);
  }
}
origin: com.yahoo.vespa/jdisc_core

/**
 * <p>Adds the given value to the entry of the specified key. If no entry exists for the given key, a new one is
 * created containing only the given value.</p>
 *
 * @param key   The key with which the specified value is to be associated.
 * @param value The value to be added to the list associated with the specified key.
 */
public void add(String key, String value) {
  List<String> lst = content.get(key);
  if (lst != null) {
    lst.add(value);
  } else {
    put(key, value);
  }
}
origin: com.yahoo.vespa/jdisc_http_service

@Override
public void setHeaders(String name, List<String> values) {
  parent.headers().put(name, values);
}
origin: com.yahoo.vespa/jdisc_http_service

@Override
public void setHeader(String name, String value) {
  parent.headers().put(name, value);
}
origin: com.yahoo.vespa/jdisc_http_service

public void setHeaders(String name, List<String> values) {
  headerFields.put(name, values);
  headerBlacklist.remove(name);
}
origin: com.yahoo.vespa/jdisc_http_service

@Override
public void setHeaders(String name, String value) {
  parent.headers().put(name, value);
}
origin: com.yahoo.vespa/jdisc_http_service

@Override
public void setHeaders(String name, List<String> values) {
  parent.headers().put(name, values);
}
origin: com.yahoo.vespa/jdisc_http_service

public void setHeaders(String name, String value) {
  headerFields.put(name, value);
  headerBlacklist.remove(name);
}
origin: com.yahoo.vespa/jdisc_http_service

@Override
public void setHeaders(String name, String value) {
  parent.headers().put(name, value);
}
com.yahoo.jdiscHeaderFieldsput

Javadoc

Convenience method to call #put(String,List) with a singleton list that contains the specified value.

Popular methods of HeaderFields

  • add
    Adds the given values to the entry of the specified key. If no entry exists for the given key, a new
  • get
  • addAll
    Adds all the entries of the given map to this. This is the same as calling #add(String,List) for eac
  • containsKey
  • contains
    Convenience method for checking whether or not a named header contains a specific value. If the name
  • containsIgnoreCase
    Convenience method for checking whether or not a named header contains a specific value, regardless
  • entries
    Returns an unmodifiable list of all key-value pairs of this. This provides a flattened view on the c
  • getFirst
    Convenience method for retrieving the first value of a named header field. If the header is not set,
  • isTrue
    Convenience method for checking whether or not a named header field is true. To satisfy this, the he
  • keySet
  • remove
    Removes the given value from the entry of the specified key.
  • <init>
  • remove,
  • <init>,
  • clear,
  • containsValue,
  • entrySet,
  • equals,
  • hashCode,
  • isEmpty,
  • putAll

Popular classes and methods

  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Window (java.awt)
  • Kernel (java.awt.image)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables us
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)