557558559560561562563564565566
{ if (value==null) remove(name); else { Buffer n = HttpHeaders.CACHE.lookup(name); Buffer v = convertValue(value); put(n, v); } }
572573574575576577578579580
* @param name the name of the field * @param value the value of the field. If null the field is cleared. */ public void put(Buffer name, String value) { Buffer n = HttpHeaders.CACHE.lookup(name); Buffer v = convertValue(value); put(n, v); }
615616617618619620621622623624625
if (list == null || list.size() == 0) { remove(name); return; } Buffer n = HttpHeaders.CACHE.lookup(name); Object v = list.get(0); if (v != null) put(n, HttpHeaderValues.CACHE.lookup(v.toString())); else
649650651652653654655656657
*/ public void add(String name, String value) throws IllegalArgumentException { if (value==null) return; Buffer n = HttpHeaders.CACHE.lookup(name); Buffer v = convertValue(value); add(n, v); }
784785786787788789790791
* @param name the field name * @param value the field long value */ public void putLongField(Buffer name, long value) { Buffer v = BufferUtil.toBuffer(value); put(name, v); }
797798799800801802803804805
* @param name the field name * @param value the field long value */ public void putLongField(String name, long value) { Buffer n = HttpHeaders.CACHE.lookup(name); Buffer v = BufferUtil.toBuffer(value); put(n, v); }
811812813814815816817818819
* @param name the field name * @param value the field long value */ public void addLongField(String name, long value) { Buffer n = HttpHeaders.CACHE.lookup(name); Buffer v = BufferUtil.toBuffer(value); add(n, v); }
825826827828829830831832
* @param name the field name * @param value the field long value */ public void addLongField(Buffer name, long value) { Buffer v = BufferUtil.toBuffer(value); add(name, v); }
839840841842843844845846
* @param date the field date value */ public void putDateField(Buffer name, long date) { String d=formatDate(date); Buffer v = new ByteArrayBuffer(d); put(name, v); }
852853854855856857858859
* @param name the field name * @param date the field date value */ public void putDateField(String name, long date) { Buffer n = HttpHeaders.CACHE.lookup(name); putDateField(n,date); }