| java.lang.Object net.jforum.util.legacy.commons.fileupload.ParameterParser
ParameterParser | public class ParameterParser (Code) | | A simple parser intended to parse sequences of name/value pairs.
Parameter values are exptected to be enclosed in quotes if they
contain unsafe characters, such as '=' characters or separators.
Parameter values are optional and can be omitted.
param1 = value; param2 = "anything goes; really"; param3
author: Oleg Kalnichevski |
Constructor Summary | |
public | ParameterParser() Default ParameterParser constructor. |
Method Summary | |
public boolean | isLowerCaseNames() Returns true if parameter names are to be converted to lower
case when name/value pairs are parsed. | public Map | parse(String str, char separator) Extracts a map of name/value pairs from the given string. | public Map | parse(char[] chars, char separator) Extracts a map of name/value pairs from the given array of
characters. | public Map | parse(char[] chars, int offset, int length, char separator) Extracts a map of name/value pairs from the given array of
characters. | public void | setLowerCaseNames(boolean b) Sets the flag if parameter names are to be converted to lower case when
name/value pairs are parsed. |
ParameterParser | public ParameterParser()(Code) | | Default ParameterParser constructor.
|
isLowerCaseNames | public boolean isLowerCaseNames()(Code) | | Returns true if parameter names are to be converted to lower
case when name/value pairs are parsed.
true if parameter names are to beconverted to lower case when name/value pairs are parsed.Otherwise returns false |
parse | public Map parse(String str, char separator)(Code) | | Extracts a map of name/value pairs from the given string. Names are
expected to be unique.
Parameters: str - the string that contains a sequence of name/value pairs Parameters: separator - the name/value pairs separator a map of name/value pairs |
parse | public Map parse(char[] chars, char separator)(Code) | | Extracts a map of name/value pairs from the given array of
characters. Names are expected to be unique.
Parameters: chars - the array of characters that contains a sequence ofname/value pairs Parameters: separator - the name/value pairs separator a map of name/value pairs |
parse | public Map parse(char[] chars, int offset, int length, char separator)(Code) | | Extracts a map of name/value pairs from the given array of
characters. Names are expected to be unique.
Parameters: chars - the array of characters that contains a sequence ofname/value pairs Parameters: offset - - the initial offset. Parameters: length - - the length. Parameters: separator - the name/value pairs separator a map of name/value pairs |
setLowerCaseNames | public void setLowerCaseNames(boolean b)(Code) | | Sets the flag if parameter names are to be converted to lower case when
name/value pairs are parsed.
Parameters: b - true if parameter names are to beconverted to lower case when name/value pairs are parsed.false otherwise. |
|
|