|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.client.utils.URIBuilder
public class URIBuilder
Builder for URI
instances.
Constructor Summary | |
---|---|
URIBuilder()
Constructs an empty instance. |
|
URIBuilder(String string)
Construct an instance from the string which must be a valid URI. |
|
URIBuilder(URI uri)
Construct an instance from the provided URI. |
Method Summary | |
---|---|
URIBuilder |
addParameter(String param,
String value)
Adds parameter to URI query. |
URIBuilder |
addParameters(List<org.apache.http.NameValuePair> nvps)
Adds URI query parameters. |
URI |
build()
Builds a URI instance. |
URIBuilder |
clearParameters()
Clears URI query parameters. |
Charset |
getCharset()
|
String |
getFragment()
|
String |
getHost()
|
String |
getPath()
|
List<String> |
getPathSegments()
|
int |
getPort()
|
List<org.apache.http.NameValuePair> |
getQueryParams()
|
String |
getScheme()
|
String |
getUserInfo()
|
boolean |
isAbsolute()
|
boolean |
isOpaque()
|
boolean |
isPathEmpty()
|
boolean |
isQueryEmpty()
|
URIBuilder |
removeQuery()
Removes URI query. |
URIBuilder |
setCharset(Charset charset)
|
URIBuilder |
setCustomQuery(String query)
Sets custom URI query. |
URIBuilder |
setFragment(String fragment)
Sets URI fragment. |
URIBuilder |
setHost(String host)
Sets URI host. |
URIBuilder |
setParameter(String param,
String value)
Sets parameter of URI query overriding existing value if set. |
URIBuilder |
setParameters(List<org.apache.http.NameValuePair> nvps)
Sets URI query parameters. |
URIBuilder |
setParameters(org.apache.http.NameValuePair... nvps)
Sets URI query parameters. |
URIBuilder |
setPath(String path)
Sets URI path. |
URIBuilder |
setPathSegments(List<String> pathSegments)
Sets URI path. |
URIBuilder |
setPathSegments(String... pathSegments)
Sets URI path. |
URIBuilder |
setPort(int port)
Sets URI port. |
URIBuilder |
setQuery(String query)
Deprecated. (4.3) use setParameters(List) or setParameters(NameValuePair...) |
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 as a combination of username and password. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public URIBuilder()
public URIBuilder(String string) throws URISyntaxException
string
- a valid URI in string form
URISyntaxException
- if the input is not a valid URIpublic URIBuilder(URI uri)
uri
- Method Detail |
---|
public URIBuilder setCharset(Charset charset)
public Charset getCharset()
public URI build() throws URISyntaxException
URI
instance.
URISyntaxException
public URIBuilder setScheme(String scheme)
public URIBuilder setUserInfo(String userInfo)
public URIBuilder setUserInfo(String username, String password)
public URIBuilder setHost(String host)
public URIBuilder setPort(int port)
public URIBuilder setPath(String path)
public URIBuilder setPathSegments(String... pathSegments)
public URIBuilder setPathSegments(List<String> pathSegments)
public URIBuilder removeQuery()
@Deprecated public URIBuilder setQuery(String query)
setParameters(List)
or setParameters(NameValuePair...)
The value is expected to be encoded form data.
URLEncodedUtils.parse(java.net.URI, java.lang.String)
public URIBuilder setParameters(List<org.apache.http.NameValuePair> nvps)
Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
public URIBuilder addParameters(List<org.apache.http.NameValuePair> nvps)
Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
public URIBuilder setParameters(org.apache.http.NameValuePair... nvps)
Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
public URIBuilder addParameter(String param, String value)
Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
public URIBuilder setParameter(String param, String value)
Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
public URIBuilder clearParameters()
public URIBuilder setCustomQuery(String query)
Please note query parameters and custom query component are mutually exclusive. This method will remove query parameters if present.
public URIBuilder setFragment(String fragment)
public boolean isAbsolute()
public boolean isOpaque()
public String getScheme()
public String getUserInfo()
public String getHost()
public int getPort()
public boolean isPathEmpty()
public List<String> getPathSegments()
public String getPath()
public boolean isQueryEmpty()
public List<org.apache.http.NameValuePair> getQueryParams()
public String getFragment()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |