public final class RequestUtil extends Object
Constructor and Description |
---|
RequestUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
filter(String message)
Filter the specified message string for characters that are sensitive
in HTML.
|
static void |
parseParameters(Map<String,String[]> map,
byte[] data,
String encoding)
Append request parameters from the specified String to the specified
Map.
|
static void |
parseParameters(Map<String,String[]> map,
String data,
String encoding)
Append request parameters from the specified String to the specified
Map.
|
public static String filter(String message)
message
- The message string to be filteredpublic static void parseParameters(Map<String,String[]> map, String data, String encoding)
IMPLEMENTATION NOTE: URL decoding is performed individually on the parsed name and value elements, rather than on the entire query string ahead of time, to properly deal with the case where the name or value includes an encoded "=" or "&" character that would otherwise be interpreted as a delimiter.
map
- Map that accumulates the resulting parametersdata
- Input string containing request parametersencoding
- The encoding to use; encoding must not be null.
If an unsupported encoding is specified the parameters will not be
parsed and the map will not be modifiedpublic static void parseParameters(Map<String,String[]> map, byte[] data, String encoding) throws UnsupportedEncodingException
IMPLEMENTATION NOTE: URL decoding is performed individually on the parsed name and value elements, rather than on the entire query string ahead of time, to properly deal with the case where the name or value includes an encoded "=" or "&" character that would otherwise be interpreted as a delimiter. NOTE: byte array data is modified by this method. Caller beware.
map
- Map that accumulates the resulting parametersdata
- Input string containing request parametersencoding
- The encoding to use; if null, the default encoding is
usedUnsupportedEncodingException
- if the requested encoding is not
supported.Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.