/*
@see javax.servlet.http.HttpServletResponse#setIntHeader(java.lang.String, int)
486703
@Override
    public void setIntHeader(String hdr, int value) {
        if (-1 == value) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "setIntHeader(" + hdr + ", -1), removing header");
            }
            this.response.removeHeader(hdr);
        } else {
            this.response.setHeader(hdr, Integer.toString(value));
        }
    }
993799
public static void setSlugHeader(HttpHeaders headers, String value) {
    if (value == null) {
      headers.remove("Slug");
    } else {
      headers.set("Slug", Lists.newArrayList(Arrays.asList(SLUG_ESCAPER.escape(value))));
    }
  }
821695
public void addHeader(String key, Object value) {
		List<Object> values = headers.get(key);
		if (values == null) {
			headers.put(key, values = new ArrayList<Object>());
		}
		values.add(value);
	}
696668
@Deprecated
    public static void addIntHeader(HttpMessage message, String name, int value) {
        message.headers().add(name, value);
    }
373142
@SuppressWarnings("unchecked")
	public T addHeader(final String name, final String value) {
		List<String> values = new ArrayList<String>();
		values.add(value);

		this.headers.put(name, values);
		return (T) this;
	}
948722
public void setInt(int index, int value)
    {
        checkIndexLength(index, SizeOf.SIZE_OF_INT);
        unsafe.putInt(base, address + index, value);
    }
336520
public void setInt(String name, int value) throws UnsupportedEncodingException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setInt", Integer.valueOf(value));
    getBodyMap().put(name, Integer.valueOf(value));
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setInt");
  }
1122548
public void setInHeader(boolean inHeader) {
        this.inHeader = inHeader;
        for(int i = 0; i < this.content.size(); i++) {
            ((RtfBasicElement) this.content.get(i)).setInHeader(inHeader);
        }
    }
335191
public void addHeader(String key, String value) {
        if (key.equals("As-User")) {
            for (int i = 0; i < this.headers.size(); i++) {
                if (this.headers.get(i).getKey().equals("As-User")) {
                    this.headers.remove(i);
                }
            }
        }
        if (key.equals("X-Box-UA")) {
            throw new IllegalArgumentException("Altering the X-Box-UA header is not permitted");
        }
        this.headers.add(new RequestHeader(key, value));
    }
527266
@Override
    public void addIntHeader(String name, int value) {

        addHeader(name, String.valueOf(value));
    }
225707
public void writeHeader(HttpMessage httpMessage) throws IOException
    {
        HttpResponse response=(HttpResponse)httpMessage;
        response.setState(HttpMessage.__MSG_SENDING);

        _ajpResponse.resetData();
        _ajpResponse.addByte(AJP13ResponsePacket.__SEND_HEADERS);
        _ajpResponse.addInt(response.getStatus());
        _ajpResponse.addString(response.getReason());

        int mark=_ajpResponse.getMark();
        _ajpResponse.addInt(0);
        int nh=0;
        Enumeration e1=response.getFieldNames();
        while (e1.hasMoreElements())
        {
            String h=(String)e1.nextElement();
            Enumeration e2=response.getFieldValues(h);
            while (e2.hasMoreElements())
            {
                _ajpResponse.addHeader(h);
                _ajpResponse.addString((String)e2.nextElement());
                nh++;
            }
        }

        if (nh>0)
            _ajpResponse.setInt(mark,nh);
        _ajpResponse.setDataSize();

        write(_ajpResponse);

        _ajpResponse.resetData();
    }
665577
@Override
	public void set(String headerName, String headerValue) {
		List<String> headerValues = new LinkedList<String>();
		headerValues.add(headerValue);
		headers.put(headerName, headerValues);
	}
1054372
public void setCustomHeader(String[] header) {
        if (header == null) {
            throw new IllegalArgumentException("Custom header can't be null.");
        }
        customHeader = new CustomHeaderLine[header.length];
        for (int i = 0; i < header.length; i++) {
            customHeader[i] = new CustomHeaderLine(header[i]);
        }
    }
782085
@Override
    public void addHeader(String hdr, String value) {
        this.response.addHeader(hdr, value);
    }
395335
public void setAddressHeader(String name, Address addr) {
		if(logger.isDebugEnabled()) {
        	logger.debug("setAddressHeader - name=" + name + ", addr=" + addr);
        }
		checkCommitted();
		String hName = getFullHeaderName(name);

		if (logger.isDebugEnabled())
			logger.debug("Setting address header [" + name + "] to value ["
					+ addr + "]");

		if (isSystemHeaderAndNotGruu(getModifiableRule(hName), (Parameterable)addr.getURI())) {
			logger.error("Error, can't set system header [" + hName + "]");
			throw new IllegalArgumentException(
					"Cant set system header, it is maintained by container!!");
		}

		if (hName.equalsIgnoreCase("From") || hName.equalsIgnoreCase("To")) {
			logger.error("Error, can't set From or To header [" + hName + "]");
			throw new IllegalArgumentException(
					"Cant set From or To header, see JSR 289 Section 4.1.2");
		}

//		if (!isAddressTypeHeader(hName)) {
//			logger.error("Error, set header, its not address type header ["
//					+ hName + "]!!");
//			throw new IllegalArgumentException(
//					"This header is not address type header");
//		}
		Header h;
		String headerNameToAdd = getCorrectHeaderName(hName);
		try {
			h = SipFactoryImpl.headerFactory.createHeader(headerNameToAdd, addr
					.toString());
			this.message.setHeader(h);
		} catch (ParseException e) {
			logger.error("Parsing problem while setting address header with name "
					+ name + " and address "+ addr, e);
		}
	}
916819
@Override
	public void setHeader(final String name, final String value) {
		LOG.debug("Setting header, " + name + '=' + value);
		headers.put(name, value);
	}
1118037
public void addHeader (@Nonnull @Nonempty final String sName, @Nullable final String sValue)
  {
    if (sValue != null)
      _addHeader (sName, sValue);
  }