Set a field.

@param header the header name of the field
@param value  the value of the field. If null the field is cleared.
343425
public void put(HttpHeader header, String value) {
        if (value == null)
            remove(header);
        else
            put(new HttpField(header, value));
    }
177785
private void addInternalHeaderFields(String name, String value) {
        String key = normalisedHeaderName(name);
        Vector<String> v = getHeaders(key);
        if (v == null) {
            v = new Vector<>();
            mHeaderFields.put(key, v);
        }

        if (value != null) {
            v.add(value);
        } else {
            mHeaderFields.remove(key);
        }
    }
86593
public void addHeaderValue(String headerName, String headerValue) {
		Objects.requireNonNull(headerName, "headerName cannot be null");
		Objects.requireNonNull(headerValue, "headerValue cannot be null");

		getHeaderValues(headerName).add(headerValue);
	}
556564
public void setHeader(String name, String value) {
		if (headers == null) {
			headers = new HashMap<String, String>();
		}
		if (value != null) {
			headers.put(name, value);
		} else {
			headers.remove(name);
		}
	}
269663
@Override
    public void setRequestHeader(String headerName, String headerValue) {
        Header header = new Header(headerName, headerValue);
        setRequestHeader(header);
    }
112177
public void setFieldValue(final Object instance, final Object value) {
        try {
            field.set(instance, value);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
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;
	}
684914
public void setHeader(String name, Object value) {
    verifyType(name, value);
    if (value != null) {
      // Modify header if necessary
      if (!ObjectUtils.nullSafeEquals(value, getHeader(name))) {
        this.modified = true;
        this.headers.put(name, value);
      }
    } else {
      // Remove header if available
      if (this.headers.containsKey(name)) {
        this.modified = true;
        this.headers.remove(name);
      }
    }
  }
392894
public void addField(String name, Object value, Object type) {
        if (value == null) {
            this.fields.add(new Field(name, null, null));
        } else {
            this.fields.add(new Field(name, value.toString(), type.toString()));
        }
    }
527266
@Override
    public void addIntHeader(String name, int value) {

        addHeader(name, String.valueOf(value));
    }
507467
public void setDateHeader(String name, long value) 
    {
        try{_httpResponse.setDateField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
474009
protected void setValueToField(Field field, Object bean, Object value) {
        try {
            field.setAccessible(true);
            field.set(bean, value);
        } catch (Exception e) {
            throw new PropertyLoaderException(
                    String.format("Can not set bean <%s> field <%s> value", bean, field), e
            );
        }
    }
1080921
private void setHeader(HttpServletResponse response, String name, String value) {
        if(response.containsHeader(value)) {
              response.setHeader(name, value);
        } else {
            response.addHeader(name, value);
        }
    }
1200112
public static void setFieldValue(ODocument document, String fieldname, String value) {
        document.field(fieldname, value);
    }
446222
public void add(HttpHeader header, String value) {
        if (value == null)
            throw new IllegalArgumentException("null value");

        HttpField field = new HttpField(header, value);
        add(field);
    }
981840
public void setValue(String field, byte[] value) throws IOException {
        int hash = Arrays.hashCode(field.getBytes());
        if (!structure.valueHash2Index.containsKey(hash)) {
            throw new IOException("The field " + field + " is unknown.");
        }
        setValue(structure.valueHash2Index.get(hash), value);
    }
1363475
@Override
    public void setResponseHeader(String key, String value) {
        this.response.setResponseHeader(key, value);
    }