Package com.iizix

Class URIParamsTokenizer

java.lang.Object
com.iizix.URIParamsTokenizer

public class URIParamsTokenizer extends Object
A tokenizer class for the URI query string.
Author:
Christopher Mindus
  • Constructor Details

    • URIParamsTokenizer

      public URIParamsTokenizer()
  • Method Details

    • tokenizeQuery

      public static Map<String,String> tokenizeQuery(String query) throws UnsupportedEncodingException
      Tokenizes 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:
      UnsupportedEncodingException - If the query string is not correctly UTF-8 encoded.
    • tokenizeURI

      public static Map<String,String> tokenizeURI(String uri) throws UnsupportedEncodingException
      Tokenizes 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:
      UnsupportedEncodingException - If the query string is not correctly UTF-8 encoded.