com.faunos.util.net.http
Class QueryString

java.lang.Object
  extended by com.faunos.util.net.http.QueryString

public class QueryString
extends Object

Utility for parsing a URI for its query string.

Author:
Babak Farhang

Constructor Summary
QueryString()
           
 
Method Summary
 boolean load(String uri)
          Loads the given uri into the instance and returns true , if successful.
 Map<String,String> nameValues()
          Returns the name-value map.
 String path()
          Returns the path.
 String queryString()
          Returns the query string part of the URI as is.
 String uri()
          Returns the URI that was passed into the last successful load operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryString

public QueryString()
Method Detail

load

public boolean load(String uri)
Loads the given uri into the instance and returns true , if successful. Otherwise, false is returned and the state of the instance remains unchanged.


uri

public final String uri()
Returns the URI that was passed into the last successful load operation.


path

public final String path()
Returns the path. This is just the part of the URI that precedes the first '?'.


queryString

public String queryString()
Returns the query string part of the URI as is. This is just the part of the URI that follows the first '?'.


nameValues

public Map<String,String> nameValues()
Returns the name-value map. The contained strings are in URL encoded format.



SourceForge.net Logo