public class ParameterParser extends Object implements BodyParser<Map<String,String>>
Mime.MIME_FORM_ENCODED_DATA and parameters in URI.| Constructor and Description |
|---|
ParameterParser() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
parseBody(InputStream inputStream,
String contentType)
Parse the body.
|
static void |
parseParameters(InputStream input,
Map<String,String> parameters)
Parses parameters.
|
public Map<String,String> parseBody(InputStream inputStream, @Nullable String contentType) throws IOException
BodyParserparseBody in interface BodyParser<Map<String,String>>inputStream - the body InputStream.contentType - the "content-type" header of the request.IOException - when an IOException occurs during the parsing.public static void parseParameters(InputStream input, Map<String,String> parameters) throws IOException
input - the input stream from which parameters should be parsedparameters - the map to populate with the parsed parameters.IOException - if an error occurs while reading the input stream.