|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Parameters
The Parameters
object is used to represent HTTP
parameters. Parameters are acquired by name and can be either a
string, float, int, or boolean value. This ensures that data can
be conviniently extracted in the correct type. This follows the
parameter methods found in the Java Servlet API Specification.
The parameter values found in a parameter set can extracted via
farmiliar methods such as getParameter
. However,
unlike the Java servlet API this wrapper for HTTP parameters is
modifiable, that is, parameters can be added and removed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Method Summary | |
---|---|
boolean |
getBoolean(java.lang.Object name)
This extracts a boolean parameter for the named value. |
float |
getFloat(java.lang.Object name)
This extracts a float parameter for the named value. |
int |
getInteger(java.lang.Object name)
This extracts an integer parameter for the named value. |
java.lang.String |
getParameter(java.lang.Object name)
This extracts a value for the given name. |
java.util.Enumeration |
getParameterNames()
This enumerates the names of every parameter. |
java.lang.String |
toString()
This will return all parameters represented using the HTTP URL query format. |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Method Detail |
---|
java.util.Enumeration getParameterNames()
getParameter
method. The resulting
Enumeration
contains string objects.
Enumeration
of namesjava.lang.String getParameter(java.lang.Object name)
Enumeration
issued. If there is no parameter of this name this will
return a null value.
name
- the name of the parameter value to retrieve
int getInteger(java.lang.Object name)
NumberFormatException
.
name
- the name of the parameter value to retrieve
java.lang.NumberFormatException
- if the value is not validfloat getFloat(java.lang.Object name)
NumberFormatException
.
name
- the name of the parameter value to retrieve
java.lang.NumberFormatException
- if the value is not validboolean getBoolean(java.lang.Object name)
true
or false
then those
boolean values are returned, otherwize it is false.
name
- the name of the parameter value to retrieve
java.lang.String toString()
x-www-form-urlencoded
format is used to encode the attributes, see RFC 2616.
This will also encode any special characters that appear within the name and value pairs as an escaped sequence. If there are no parameters an empty string is returned.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |