field = new Field(name, value); _fields.add(field);
public void putTo(Buffer buffer) throws IOException { for (int i = 0; i < _fields.size(); i++) { Field field = _fields.get(i); if (field != null) field.putTo(buffer); } BufferUtil.putCRLF(buffer); }
switch (field.getNameOrdinal()) _contentLength = field.getLongValue(); field.putTo(_header); break; if (BufferUtil.isPrefix(MimeTypes.MULTIPART_BYTERANGES_BUFFER, field.getValueBuffer())) _contentLength = HttpTokens.SELF_DEFINING_CONTENT; field.putTo(_header); break; field.putTo(_header); int connection_value = field.getValueOrdinal(); switch (connection_value) String[] values = field.getValue().split(","); for (int i=0;values!=null && i<values.length;i++) field.putTo(_header); continue; else connection.append(','); connection.append(field.getValue()); field.putTo(_header);
switch (field.getNameOrdinal()) _contentLength = field.getLongValue(); field.putTo(_header); break; if (BufferUtil.isPrefix(MimeTypes.MULTIPART_BYTERANGES_BUFFER, field.getValueBuffer())) _contentLength = HttpTokens.SELF_DEFINING_CONTENT; field.putTo(_header); break; field.putTo(_header); int connection_value = field.getValueOrdinal(); switch (connection_value) String[] values = field.getValue().split(","); for (int i=0;values!=null && i<values.length;i++) field.putTo(_header); continue; else connection.append(','); connection.append(field.getValue()); field.putTo(_header);
switch (field.getNameOrdinal()) _contentLength = field.getLongValue(); field.putTo(_header); break; if (BufferUtil.isPrefix(MimeTypes.MULTIPART_BYTERANGES_BUFFER, field.getValueBuffer())) _contentLength = HttpTokens.SELF_DEFINING_CONTENT; field.putTo(_header); break; field.putTo(_header); int connection_value = field.getValueOrdinal(); switch (connection_value) String[] values = field.getValue().split(","); for (int i=0;values!=null && i<values.length;i++) field.putTo(_header); continue; else connection.append(','); connection.append(field.getValue()); field.putTo(_header);
switch (field.getNameOrdinal()) _contentLength = field.getLongValue(); field.putTo(_header); break; if (BufferUtil.isPrefix(MimeTypes.MULTIPART_BYTERANGES_BUFFER, field.getValueBuffer())) _contentLength = HttpTokens.SELF_DEFINING_CONTENT; field.putTo(_header); break; field.putTo(_header); int connection_value = field.getValueOrdinal(); switch (connection_value) String[] values = field.getValue().split(","); for (int i=0;values!=null && i<values.length;i++) field.putTo(_header); continue; else connection.append(','); connection.append(field.getValue()); field.putTo(_header);
switch (field.getNameOrdinal()) _contentLength = field.getLongValue(); field.putTo(_header); break; if (BufferUtil.isPrefix(MimeTypes.MULTIPART_BYTERANGES_BUFFER, field.getValueBuffer())) _contentLength = HttpTokens.SELF_DEFINING_CONTENT; field.putTo(_header); break; field.putTo(_header); int connection_value = field.getValueOrdinal(); switch (connection_value) String[] values = field.getValue().split(","); for (int i=0;values!=null && i<values.length;i++) field.putTo(_header); continue; else connection.append(','); connection.append(field.getValue()); field.putTo(_header);
field = new Field(name, value); _fields.add(field);
field = new Field(name, value); _fields.add(field);
field = new Field(name, value); _fields.add(field);
field = new Field(name, value); _fields.add(field);
public String toString() { try { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < _fields.size(); i++) { Field field = (Field) _fields.get(i); if (field != null) { String tmp = field.getName(); if (tmp != null) buffer.append(tmp); buffer.append(": "); tmp = field.getValue(); if (tmp != null) buffer.append(tmp); buffer.append("\r\n"); } } buffer.append("\r\n"); return buffer.toString(); } catch (Exception e) { LOG.warn(e); return e.toString(); } }
public String toString() { try { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < _fields.size(); i++) { Field field = (Field) _fields.get(i); if (field != null) { String tmp = field.getName(); if (tmp != null) buffer.append(tmp); buffer.append(": "); tmp = field.getValue(); if (tmp != null) buffer.append(tmp); buffer.append("\r\n"); } } buffer.append("\r\n"); return buffer.toString(); } catch (Exception e) { LOG.warn(e); return e.toString(); } }
public String toString() { try { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < _fields.size(); i++) { Field field = (Field) _fields.get(i); if (field != null) { String tmp = field.getName(); if (tmp != null) buffer.append(tmp); buffer.append(": "); tmp = field.getValue(); if (tmp != null) buffer.append(tmp); buffer.append("\r\n"); } } buffer.append("\r\n"); return buffer.toString(); } catch (Exception e) { LOG.warn(e); return e.toString(); } }
public String toString() { try { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < _fields.size(); i++) { Field field = (Field) _fields.get(i); if (field != null) { String tmp = field.getName(); if (tmp != null) buffer.append(tmp); buffer.append(": "); tmp = field.getValue(); if (tmp != null) buffer.append(tmp); buffer.append("\r\n"); } } buffer.append("\r\n"); return buffer.toString(); } catch (Exception e) { LOG.warn(e); return e.toString(); } }
public String toString() { try { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < _fields.size(); i++) { Field field = (Field) _fields.get(i); if (field != null) { String tmp = field.getName(); if (tmp != null) buffer.append(tmp); buffer.append(": "); tmp = field.getValue(); if (tmp != null) buffer.append(tmp); buffer.append("\r\n"); } } buffer.append("\r\n"); return buffer.toString(); } catch (Exception e) { LOG.warn(e); return e.toString(); } }
/** * Set a field. * * @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, Buffer value) { remove(name); if (value == null) return; if (!(name instanceof BufferCache.CachedBuffer)) name = HttpHeaders.CACHE.lookup(name); if (!(value instanceof CachedBuffer)) value= HttpHeaderValues.CACHE.lookup(value).asImmutableBuffer(); // new value; Field field = new Field(name, value); _fields.add(field); _names.put(name, field); }