Package com.iizix
Class URIParamsTokenizer
- java.lang.Object
- com.iizix.URIParamsTokenizer
public class URIParamsTokenizer extends java.lang.ObjectA tokenizer class for the URI query string.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description URIParamsTokenizer()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.String>tokenizeQuery(java.lang.String query)Tokenizes the Query part of URI and returns a map of the parameters.static java.util.Map<java.lang.String,java.lang.String>tokenizeURI(java.lang.String uri)Tokenizes the URI and returns a map of the parameters in the query.
Method Detail
tokenizeQuery
public static java.util.Map<java.lang.String,java.lang.String> tokenizeQuery(java.lang.String query) throws java.io.UnsupportedEncodingExceptionTokenizes the Query part of URI and returns a map of the parameters.- Parameters:
query- The query string after the "?".- Returns:
- A new map of parameters. Parameter without equal sign are added with a null value.
- Throws:
java.io.UnsupportedEncodingException- If the query string is not correctly UTF-8 encoded.
tokenizeURI
public static java.util.Map<java.lang.String,java.lang.String> tokenizeURI(java.lang.String uri) throws java.io.UnsupportedEncodingExceptionTokenizes the URI and returns a map of the parameters in the query.- Parameters:
uri- The URI string.- Returns:
- A new map of parameters. Parameter without equal sign are added with a null value.
- Throws:
java.io.UnsupportedEncodingException- If the query string is not correctly UTF-8 encoded.