Ejemplo n.º 1
0
 /**
  * Cleans the current header entries and copies all header entries of the specified {@code
  * headers}.
  *
  * @return {@code this}
  */
 public HttpHeaders set(HttpHeaders headers) {
   if (headers == null) {
     throw new NullPointerException("headers");
   }
   clear();
   for (Map.Entry<String, String> e : headers) {
     add(e.getKey(), e.getValue());
   }
   return this;
 }
Ejemplo n.º 2
0
 @Override
 public void reset() {
   headers.clear();
   status = HttpResponseStatus.OK;
 }