public class ParserUtils extends Object
| Constructor and Description |
|---|
ParserUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
extractFormData(String contentType,
String content)
This method extracts multipart/form-data from a http-request-body.
|
static String |
normalizePath(String path)
This method does a simple path-normalization.
|
static Hashtable<String,String> |
parseQueryString(String qs)
Parses the QueryString and returns a hash of (param,value)-pairs.
|
static String[] |
splitQuotedString(String input)
Splits a string which might contain quoted substrings.
|
static String[] |
splitQuotedString(String input,
String pattern) |
static String[] |
splitQuotedString(String input,
String quoteChar,
String pattern)
This method splits a possible quoted String into tokens, respecting the quotations.
|
public static String[] splitQuotedString(String input)
splitQuotedString(input, ").input - The string to splitpublic static String[] splitQuotedString(String input, String quoteChar, String pattern)
input - A string, possibly containing quotes.public static Hashtable<String,String> parseQueryString(String qs)
&, parameters and values
will be split using =.
A possible trailing string starting with # will be ignored.qs - The query-string that will be parsed.public static String extractFormData(String contentType, String content) throws Exception
contentType - The content-type.content - The content that is to be decoded.ExceptionCopyright © 2014 jwall.org. All Rights Reserved.