Package com.linkedin.alpini.base.misc
Class QueryStringDecoder
java.lang.Object
com.linkedin.alpini.base.misc.QueryStringDecoder
Imported this implementation from netty 3.2.4 because the implementation within 3.5.11 will corrupt
uri paths, converting ';' semicolons into '&' ampersands.
Splits an HTTP query string into a path string and key-value parameter pairs.
This decoder is for one time use only. Create a new instance for each URI:
QueryStringDecoder
decoder = newQueryStringDecoder
("/hello?recipient=world"); assert decoder.getPath().equals("/hello"); assert decoder.getParameters().get("recipient").equals("world");
- See Also:
-
- "org.jboss.netty.handler.codec.http.QueryStringEncoder"
-
Constructor Summary
ConstructorDescriptionQueryStringDecoder
(String uri) Creates a new decoder that decodes the specified URI.QueryStringDecoder
(String uri, String charset) Deprecated.QueryStringDecoder
(String uri, Charset charset) Creates a new decoder that decodes the specified URI encoded in the specified charset.QueryStringDecoder
(URI uri) Creates a new decoder that decodes the specified URI.QueryStringDecoder
(URI uri, String charset) Deprecated.UseQueryStringDecoder(URI, Charset)
instead.QueryStringDecoder
(URI uri, Charset charset) Creates a new decoder that decodes the specified URI encoded in the specified charset. -
Method Summary
-
Constructor Details
-
QueryStringDecoder
Creates a new decoder that decodes the specified URI. The decoder will assume that the query string is encoded in UTF-8. -
QueryStringDecoder
Creates a new decoder that decodes the specified URI encoded in the specified charset. -
QueryStringDecoder
Deprecated.UseQueryStringDecoder(String, Charset)
instead. -
QueryStringDecoder
Creates a new decoder that decodes the specified URI. The decoder will assume that the query string is encoded in UTF-8. -
QueryStringDecoder
Creates a new decoder that decodes the specified URI encoded in the specified charset. -
QueryStringDecoder
Deprecated.UseQueryStringDecoder(URI, Charset)
instead.
-
-
Method Details
-
getPath
Returns the decoded path string of the URI. -
getParameters
Returns the decoded key-value parameter pairs of the URI.
-
QueryStringDecoder(String, Charset)
instead.