Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class HttpParametersMap extends Object implements MutableHttpParameters
| Constructor and Description |
|---|
HttpParametersMap()
Creates an empty set of parameters.
|
HttpParametersMap(String parameters,
String encoding)
Parses the provided URL-Encoded parameter string.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(String name,
String value) |
String |
getParameter(String name)
Gets the value for the provided parameter name or
null if doesn't exist. |
Map<String,List<String>> |
getParameterMap()
Gets an unmodifiable map view of all parameters.
|
Iterator<String> |
getParameterNames()
Gets an unmodifiable interator of the parameter names.
|
List<String> |
getParameterValues(String name)
Gets an unmodifiable view of all values for a multi-value parameter or
null if has no values. |
public HttpParametersMap()
public HttpParametersMap(String parameters, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic String getParameter(String name)
HttpParametersnull if doesn't exist.
If the parameter has multiple values, the first value is returned.getParameter in interface HttpParameterspublic Iterator<String> getParameterNames()
HttpParametersgetParameterNames in interface HttpParameterspublic List<String> getParameterValues(String name)
HttpParametersnull if has no values.getParameterValues in interface HttpParameterspublic Map<String,List<String>> getParameterMap()
HttpParametersgetParameterMap in interface HttpParameterspublic void addParameter(String name, String value)
addParameter in interface MutableHttpParametersCopyright © 2000–2016 AO Industries, Inc.. All rights reserved.