HeaderValueFormatterpublic interface HeaderValueFormatter Interface for formatting elements of a header value.
This is the complement to {@link HeaderValueParser}.
Instances of this interface are expected to be stateless and thread-safe.
All formatting methods accept an optional buffer argument.
If a buffer is passed in, the formatted element will be appended
and the modified buffer is returned. If no buffer is passed in,
a new buffer will be created and filled with the formatted element.
In both cases, the caller is allowed to modify the returned buffer.
|
Methods Summary |
---|
public org.apache.http.util.CharArrayBuffer | formatElements(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.HeaderElement[] elems, boolean quote)Formats an array of header elements.
| public org.apache.http.util.CharArrayBuffer | formatHeaderElement(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.HeaderElement elem, boolean quote)Formats one header element.
| public org.apache.http.util.CharArrayBuffer | formatNameValuePair(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.NameValuePair nvp, boolean quote)Formats one name-value pair, where the value is optional.
| public org.apache.http.util.CharArrayBuffer | formatParameters(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.NameValuePair[] nvps, boolean quote)Formats the parameters of a header element.
That's a list of name-value pairs, to be separated by semicolons.
This method will not generate a leading semicolon.
|
|