org.apache.catalina.util
public final class RequestUtil extends Object
Version: $Revision: 739532 $ $Date: 2009-01-31 10:52:13 +0100 (Sat, 31 Jan 2009) $
Method Summary | |
---|---|
static String | filter(String message)
Filter the specified message string for characters that are sensitive
in HTML. |
static String | normalize(String path)
Normalize a relative URI path that may have relative values ("/./",
"/../", and so on ) it it. |
static String | normalize(String path, boolean replaceBackSlash)
Normalize a relative URI path that may have relative values ("/./",
"/../", and so on ) it it. |
static void | parseParameters(Map map, String data, String encoding)
Append request parameters from the specified String to the specified
Map. |
static void | parseParameters(Map map, byte[] data, String encoding)
Append request parameters from the specified String to the specified
Map. |
static String | URLDecode(String str)
Decode and return the specified URL-encoded String.
|
static String | URLDecode(String str, String enc)
Decode and return the specified URL-encoded String. |
static String | URLDecode(String str, String enc, boolean isQuery)
Decode and return the specified URL-encoded String.
|
static String | URLDecode(byte[] bytes)
Decode and return the specified URL-encoded byte array. |
static String | URLDecode(byte[] bytes, String enc)
Decode and return the specified URL-encoded byte array. |
static String | URLDecode(byte[] bytes, String enc, boolean isQuery)
Decode and return the specified URL-encoded byte array.
|
Parameters: message The message string to be filtered
Parameters: path Relative path to be normalized
Parameters: path Relative path to be normalized replaceBackSlash Should '\\' be replaced with '/'
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.
Parameters: map Map that accumulates the resulting parameters data Input string containing request parameters
Throws: IllegalArgumentException if the data is malformed
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.
Parameters: map Map that accumulates the resulting parameters data Input string containing request parameters encoding Encoding to use for converting hex
Throws: UnsupportedEncodingException if the data is malformed
Parameters: str The url-encoded string
Throws: IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number
Parameters: str The url-encoded string enc The encoding to use; if null, the default encoding is used
Throws: IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number
Parameters: str The url-encoded string enc The encoding to use; if null, the default encoding is used isQuery Is this a query string being processed
Throws: IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number
Parameters: bytes The url-encoded byte array
Throws: IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number
Parameters: bytes The url-encoded byte array enc The encoding to use; if null, the default encoding is used
Throws: IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number
Parameters: bytes The url-encoded byte array enc The encoding to use; if null, the default encoding is used isQuery Is this a query string being processed
Throws: IllegalArgumentException if a '%' character is not followed by a valid 2-digit hexadecimal number