/** * 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; }
@Override public void reset() { headers.clear(); status = HttpResponseStatus.OK; }