Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.netty.handler.codec.http
Class QueryStringDecoder

    java.lang.Object
      org.jboss.netty.handler.codec.http.QueryStringDecoder

    public class QueryStringDecoder

extends Object

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 = new QueryStringDecoder("/hello?recipient=world");
     assert decoder.getPath().equals("/hello");
     assert decoder.getParameters().get("recipient").equals("world");

Version:
  $Rev: 2302 $, $Date: 2010-06-14 20:07:44 +0900 (Mon, 14 Jun 2010) $
Author:
  The Netty Project, Andy Taylor (andy.taylor@jboss.org), Trustin Lee, Benoit Sigoure
See Also:
  `QueryStringEncoder`

Constructor Summary
`QueryStringDecoder(String uri)` Creates a new decoder that decodes the specified URI.
`QueryStringDecoder(String uri, Charset charset)` Creates a new decoder that decodes the specified URI encoded in the specified charset.
`QueryStringDecoder(String uri, String charset)` Deprecated. Use `QueryStringDecoder(String, Charset)` instead.
`QueryStringDecoder(URI uri)` Creates a new decoder that decodes the specified URI.
`QueryStringDecoder(URI uri, Charset charset)` Creates a new decoder that decodes the specified URI encoded in the specified charset.
`QueryStringDecoder(URI uri, String charset)` Deprecated. Use `QueryStringDecoder(URI, Charset)` instead.

Method Summary
`Map<String,List<String>>` | `getParameters()` Returns the decoded key-value parameter pairs of the URI.
`String` | `getPath()` Returns the decoded path string of the URI.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QueryStringDecoder

    public QueryStringDecoder(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(String uri,
                              Charset charset)

  Creates a new decoder that decodes the specified URI encoded in the specified charset.

### QueryStringDecoder

    @Deprecated
    public QueryStringDecoder(String uri,
                                         String charset)

  Deprecated. Use `QueryStringDecoder(String, Charset)` instead.

### QueryStringDecoder

    public QueryStringDecoder(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(URI uri,
                              Charset charset)

  Creates a new decoder that decodes the specified URI encoded in the specified charset.

### QueryStringDecoder

    @Deprecated
    public QueryStringDecoder(URI uri,
                                         String charset)

  Deprecated. Use `QueryStringDecoder(URI, Charset)` instead.

Method Detail

### getPath

    public String getPath()

  Returns the decoded path string of the URI.

### getParameters

    public Map<String,List<String>> getParameters()

  Returns the decoded key-value parameter pairs of the URI.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.