Package com.iizix

Class URIParamsTokenizer


  • public class URIParamsTokenizer
    extends java.lang.Object
    A tokenizer class for the URI query string.
    Author:
    Christopher Mindus
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • URIParamsTokenizer

        public URIParamsTokenizer()
    • Method Detail

      • tokenizeQuery

        public static java.util.Map<java.lang.String,​java.lang.String> tokenizeQuery​(java.lang.String query)
                                                                                    throws java.io.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:
        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.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:
        java.io.UnsupportedEncodingException - If the query string is not correctly UTF-8 encoded.