MCPcopy Create free account
hub / github.com/apache/tomcat / setValue

Method setValue

java/org/apache/tomcat/util/http/MimeHeaders.java:339–353  ·  view source on GitHub ↗

Allow "set" operations, which removes all current values for this header. @param name The header name @return the message bytes container for the value

(String name)

Source from the content-addressed store, hash-verified

337 * @return the message bytes container for the value
338 */
339 public MessageBytes setValue(String name) {
340 for (int i = 0; i < count; i++) {
341 if (headers[i].getName().equalsIgnoreCase(name)) {
342 for (int j = i + 1; j < count; j++) {
343 if (headers[j].getName().equalsIgnoreCase(name)) {
344 removeHeader(j--);
345 }
346 }
347 return headers[i].getValue();
348 }
349 }
350 MimeHeaderField mh = createHeader();
351 mh.getName().setString(name);
352 return mh.getValue();
353 }
354
355 // -------------------- Getting headers --------------------
356

Calls 8

removeHeaderMethod · 0.95
createHeaderMethod · 0.95
getNameMethod · 0.95
getValueMethod · 0.95
getNameMethod · 0.65
getValueMethod · 0.65
equalsIgnoreCaseMethod · 0.45
setStringMethod · 0.45