Package com.Ostermiller.util
Class NameValuePair
java.lang.Object
com.Ostermiller.util.NameValuePair
Represents a name value pair as would be used as a CGI parameter.
More information about this class is available from ostermiller.org.
- Since:
- ostermillerutils 1.03.00
- Author:
- Stephen Ostermiller https://ostermiller.org/contact.pl?regarding=Java+Utilities
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NameValuePair
Construct a name value pair.- Parameters:
name- name of the pair.value- value of the pair.- Since:
- ostermillerutils 1.03.00
-
-
Method Details
-
getName
Get the name of the pair.- Returns:
- the name of the pair.
- Since:
- ostermillerutils 1.03.00
-
getValue
Get the value of the pair.- Returns:
- the value of the pair.
- Since:
- ostermillerutils 1.03.00
-
toString
Get the name and value as CGI parameters, URL Encoded to UTF-8. -
toString
Get the name and value as CGI parameters, URL Encoded to the given encoding.- Parameters:
charset- Character set to use when URL Encoding.- Returns:
- CGI appropriate representation of the pair.
- Throws:
UnsupportedEncodingException- if the given character set is not supported- Since:
- ostermillerutils 1.03.00
-