Package com.linkedin.alpini.base.misc
Class QueryStringDecoder
- java.lang.Object
-
- com.linkedin.alpini.base.misc.QueryStringDecoder
-
public class QueryStringDecoder extends java.lang.Object
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
Constructors Constructor Description QueryStringDecoder(java.lang.String uri)
Creates a new decoder that decodes the specified URI.QueryStringDecoder(java.lang.String uri, java.lang.String charset)
Deprecated.UseQueryStringDecoder(String, Charset)
instead.QueryStringDecoder(java.lang.String uri, java.nio.charset.Charset charset)
Creates a new decoder that decodes the specified URI encoded in the specified charset.QueryStringDecoder(java.net.URI uri)
Creates a new decoder that decodes the specified URI.QueryStringDecoder(java.net.URI uri, java.lang.String charset)
Deprecated.UseQueryStringDecoder(URI, Charset)
instead.QueryStringDecoder(java.net.URI uri, java.nio.charset.Charset charset)
Creates a new decoder that decodes the specified URI encoded in the specified charset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getParameters()
Returns the decoded key-value parameter pairs of the URI.java.lang.String
getPath()
Returns the decoded path string of the URI.
-
-
-
Constructor Detail
-
QueryStringDecoder
public QueryStringDecoder(java.lang.String uri)
Creates a new decoder that decodes the specified URI. The decoder will assume that the query string is encoded in UTF-8.
-
QueryStringDecoder
public QueryStringDecoder(java.lang.String uri, java.nio.charset.Charset charset)
Creates a new decoder that decodes the specified URI encoded in the specified charset.
-
QueryStringDecoder
@Deprecated public QueryStringDecoder(java.lang.String uri, java.lang.String charset)
Deprecated.UseQueryStringDecoder(String, Charset)
instead.
-
QueryStringDecoder
public QueryStringDecoder(java.net.URI uri)
Creates a new decoder that decodes the specified URI. The decoder will assume that the query string is encoded in UTF-8.
-
QueryStringDecoder
public QueryStringDecoder(java.net.URI uri, java.nio.charset.Charset charset)
Creates a new decoder that decodes the specified URI encoded in the specified charset.
-
QueryStringDecoder
@Deprecated public QueryStringDecoder(java.net.URI uri, java.lang.String charset)
Deprecated.UseQueryStringDecoder(URI, Charset)
instead.
-
-