|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.netty.handler.codec.http.QueryStringEncoder
public class QueryStringEncoder
Creates an URL-encoded URI from a path string and key-value parameter pairs. This encoder is for one time use only. Create a new instance for each URI.
QueryStringEncoder encoder = new QueryStringDecoder("/hello"); encoder.addParam("recipient", "world"); assert encoder.toString().equals("/hello?recipient=world");
QueryStringDecoder
Constructor Summary | |
---|---|
QueryStringEncoder(String uri)
Creates a new encoder that encodes a URI that starts with the specified path string. |
|
QueryStringEncoder(String uri,
String charset)
Creates a new encoder that encodes a URI that starts with the specified path string in the specified charset. |
Method Summary | |
---|---|
void |
addParam(String name,
String value)
Adds a parameter with the specified name and value to this encoder. |
String |
toString()
Returns the URL-encoded URI which was created from the path string specified in the constructor and the parameters added by addParam(String, String) method. |
URI |
toUri()
Returns the URL-encoded URI object which was created from the path string specified in the constructor and the parameters added by addParam(String, String) method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryStringEncoder(String uri)
public QueryStringEncoder(String uri, String charset)
Method Detail |
---|
public void addParam(String name, String value)
public URI toUri() throws URISyntaxException
addParam(String, String)
method.
URISyntaxException
public String toString()
addParam(String, String)
method.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |