Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.commons.httpclient.util.ParameterFormatter
public class ParameterFormatter
extends java.lang.Object
token = 1*A string of text is parsed as a single word if it is quoted using double-quote marks.separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT
quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) qdtext ==""<">>
="
" The="The" backslash="backslash" character="character" ("\")="("\")" MAY="MAY" be="be" used="used" as="as" a="a" single-character="single-character" quoting="quoting" mechanism="mechanism" only="only" within="within" quoted-string="quoted-string" and="and" comment="comment" constructs.="constructs."
=""=""" quoted-pair="\" CHAR="CHAR"="
="
" Parameters="Parameters" are="are" in="in" the="the" form="form" of="of" attribute/value="attribute/value" pairs.="pairs."
=""="" parameter="attribute" "=" value attribute = token value = token | quoted-string">">>>
Constructor Summary | |
|
Method Summary | |
void |
|
String |
|
static void |
|
boolean |
|
void |
|
public void format(StringBuffer buffer, NameValuePair param)
Produces textual representaion of the attribute/value pair using formatting rules defined in RFC 2616
- Parameters:
buffer
- output bufferparam
- the parameter to be formatted
public String format(NameValuePair param)
Produces textual representaion of the attribute/value pair using formatting rules defined in RFC 2616
- Parameters:
param
- the parameter to be formatted
- Returns:
- RFC 2616 conformant textual representaion of the attribute/value pair
public static void formatValue(StringBuffer buffer, String value, boolean alwaysUseQuotes)
Formats the given parameter value using formatting rules defined in RFC 2616
- Parameters:
buffer
- output buffervalue
- the parameter value to be formattedalwaysUseQuotes
- true if the parameter value must be enclosed in quotation marks, even if it does not contain any special characters, false only if the parameter value contains potentially unsafe special characters
public boolean isAlwaysUseQuotes()
Determines whether all parameter values must be enclosed in quotation marks, even if they do not contain any special characters
- Returns:
- true if all parameter values must be enclosed in quotation marks, false otherwise
public void setAlwaysUseQuotes(boolean alwaysUseQuotes)
Defines whether all parameter values must be enclosed in quotation marks, even if they do not contain any special characters
- Parameters:
alwaysUseQuotes
-