com.waveset.util
Class URLQueryParser

java.lang.Object
  extended bycom.waveset.util.URLQueryParser

public class URLQueryParser
extends java.lang.Object


Field Summary
static java.lang.String EQUALS
           
static java.lang.String QUERY
           
 
Method Summary
static java.util.Map getAttributes(java.lang.String query)
          Parses and decodes query attributes into a map of name value pairs.
static java.util.Map getAttributes(java.lang.String query, boolean decode)
          Decodes query attributes into a map of name value pairs.
static java.util.Map parsePost(java.lang.String post, boolean decode)
          Parses a block of post data into a map of name-value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY

public static final java.lang.String QUERY
See Also:
Constant Field Values

EQUALS

public static final java.lang.String EQUALS
See Also:
Constant Field Values
Method Detail

getAttributes

public static java.util.Map getAttributes(java.lang.String query)
                                   throws java.net.MalformedURLException
Parses and decodes query attributes into a map of name value pairs.

Parameters:
query - URL query string to parse for attributes.
Returns:
Map of name/value pairs parsed from the query string
Throws:
java.net.MalformedURLException

getAttributes

public static java.util.Map getAttributes(java.lang.String query,
                                          boolean decode)
                                   throws java.net.MalformedURLException
Decodes query attributes into a map of name value pairs. Decodes both name and value if specified.

Parameters:
query - URL query string to parse for attributes.
decode - To decode or not to decode the name and value pairs.
Returns:
Map of name/value pairs parsed from the query string
Throws:
java.net.MalformedURLException

parsePost

public static java.util.Map parsePost(java.lang.String post,
                                      boolean decode)
                               throws java.net.MalformedURLException
Parses a block of post data into a map of name-value pairs. Decodes both name and value if specified.

Parameters:
post - Post data to parse for attributes.
decode - To decode or not to decode the name and value pairs.
Returns:
Map of name/value pairs parsed from the post data
Throws:
java.net.MalformedURLException