org.apache.http.client.utils
Class URIBuilder

java.lang.Object
  extended by org.apache.http.client.utils.URIBuilder

public class URIBuilder
extends Object

Since:
4.2

Constructor Summary
URIBuilder()
           
URIBuilder(String string)
           
URIBuilder(URI uri)
           
 
Method Summary
 URIBuilder addParameter(String param, String value)
          Adds a parameter-value pair to URI query.
 URI build()
          Builds a URI instance.
 URIBuilder removeQuery()
          Removes all query parameters.
 URIBuilder setFragment(String fragment)
          Sets URI fragment.
 URIBuilder setHost(String host)
          Sets URI host.
 URIBuilder setParameter(String param, String value)
          Sets parameter-value pair to URI query removing existing parameters with the same name.
 URIBuilder setPath(String path)
          Sets URI path.
 URIBuilder setPort(int port)
          Sets URI port.
 URIBuilder setQuery(String query)
          Set URI query.
 URIBuilder setScheme(String scheme)
          Sets URI scheme.
 URIBuilder setUserInfo(String userInfo)
          Sets URI user-info.
 URIBuilder setUserInfo(String username, String password)
          Sets URI user-info in a form of 'username:password'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIBuilder

public URIBuilder()

URIBuilder

public URIBuilder(String string)
           throws URISyntaxException
Throws:
URISyntaxException

URIBuilder

public URIBuilder(URI uri)
Method Detail

build

public URI build()
          throws URISyntaxException
Builds a URI instance.

Throws:
URISyntaxException

setScheme

public URIBuilder setScheme(String scheme)
Sets URI scheme.


setUserInfo

public URIBuilder setUserInfo(String userInfo)
Sets URI user-info.


setUserInfo

public URIBuilder setUserInfo(String username,
                              String password)
Sets URI user-info in a form of 'username:password'.


setHost

public URIBuilder setHost(String host)
Sets URI host.


setPort

public URIBuilder setPort(int port)
Sets URI port.


setPath

public URIBuilder setPath(String path)
Sets URI path.


removeQuery

public URIBuilder removeQuery()
Removes all query parameters.


setQuery

public URIBuilder setQuery(String query)
Set URI query.


addParameter

public URIBuilder addParameter(String param,
                               String value)
Adds a parameter-value pair to URI query.


setParameter

public URIBuilder setParameter(String param,
                               String value)
Sets parameter-value pair to URI query removing existing parameters with the same name.


setFragment

public URIBuilder setFragment(String fragment)
Sets URI fragment.



Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.