common/src/main/java/HTTPClient/HttpHeaderElement.java
/**
     * Append this header element to the given buffer. This is basically a
     * more efficient version of <code>toString()</code> for assembling
     * multiple elements.
     *
     * @param buf the StringBuffer to append this header to
     * @see #toString()
     */
Append this header element to the given buffer. This is basically a
more efficient version of toString() for assembling
multiple elements.

@param buf the StringBuffer to append this header to
@see #toString()
Append this header element to the given buffer . This is basically a more efficient version of toString () for assembling multiple elements . @param buf the StringBuffer to append this header to @see #toString ()
public void appendTo(StringBuffer buf)
    {
	buf.append(name);
	if (value != null)
	{
	    if (Util.needsQuoting(value))
	    {
		buf.append("=\"");
		buf.append(Util.quoteString(value, "\\\""));
		buf.append('"');
	    }
	    else
	    {
		buf.append('=');
		buf.append(value);
	    }
	}
	for (int idx=0; idx<parameters.length; idx++)
	{
	    buf.append(";");
	    buf.append(parameters[idx].getName());
	    String pval = parameters[idx].getValue();
	    if (pval != null)
	    {
		if (Util.needsQuoting(pval))
		{
		    buf.append("=\"");
		    buf.append(Util.quoteString(pval, "\\\""));
		    buf.append('"');
		}
		else
		{
		    buf.append('=');
		    buf.append(pval);
		}
	    }
	}
    }
public void appendTo ( StringBuffer buf ) { buf . append ( name ) ; if ( value != null ) { if ( Util . needsQuoting ( value ) ) { buf . append ( "=\"" ) ; buf . append ( Util . quoteString ( value , "\\\"" ) ) ; buf . append ( '"' ) ; } else { buf . append ( '=' ) ; buf . append ( value ) ; } } for ( int idx = 0 ; idx < parameters . length ; idx ++ ) { buf . append ( ";" ) ; buf . append ( parameters [ idx ] . getName ( ) ) ; String pval = parameters [ idx ] . getValue ( ) ; if ( pval != null ) { if ( Util . needsQuoting ( pval ) ) { buf . append ( "=\"" ) ; buf . append ( Util . quoteString ( pval , "\\\"" ) ) ; buf . append ( '"' ) ; } else { buf . append ( '=' ) ; buf . append ( pval ) ; } } } }
Append this header element to the given buffer.
Append this header element to the given buffer .