URI instances.
| Modifier and Type | Field and Description |
|---|---|
| private Charset | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private static final char | |
| private static final char | |
| private static final BitSet | |
| private boolean | |
| private List | |
| private int | |
| private String | |
| private static final char | |
| private static final BitSet | |
| private static final BitSet | |
| private List | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | URIBuilder(final String
a valid URI in string form. uriString)Constructs an instance from the string which must be a valid URI. |
| public | |
| public | URIBuilder(final String
a valid URI in string form. uriString, final Charset charset)Constructs an instance from the string which must be a valid URI. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URI | |
| private String | |
| public URIBuilder | |
| private void | |
| pack-priv static void | formatPath(final StringBuilder buf, final Iterable<String> segments, final boolean rootless, final Charset charset)
|
| pack-priv static void | formatQuery(final StringBuilder buf, final Iterable<? extends NameValuePair> params, final Charset charset, final boolean blankAsPlus)
|
| public URIAuthority | |
| public Charset | |
| public NameValuePair | Returns: the first namedNameValuePair or null if not found.the name name)Gets the first |
| public String | |
| public String | |
| public String | |
| public List | |
| public int | |
| public List | |
| public String | |
| public String | |
| public String | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static URIBuilder | |
| public static URIBuilder | |
| public URIBuilder | normalizeSyntax()
Normalizes syntax of URI components if the URI is considered non-opaque (the path component has a root):
|
| pack-priv static List | |
| pack-priv static List | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | Returns: this.the scheme, host name, and port. httpHost)Sets the scheme, host name, and port. |
| public URIBuilder | Returns: this.Sets parameter of URI query overriding existing value if set. |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | Returns: this.Sets rootless URI path (the first segment does not start with a /). |
| public URIBuilder | Returns: this.Sets rootless URI path (the first segment does not start with a /). |
| public URIBuilder | |
| public URIBuilder | |
| public URIBuilder | Returns: this.Sets the URI scheme specific part. |
| public URIBuilder | Returns: this.Optional, can be null. Variable arguments list of NameValuePair query parameters to be reused by the specific scheme part nvps)Sets the URI scheme specific part and append a variable arguments list of NameValuePair instance(s) to this part. |
| public URIBuilder | Returns: this.Optional, can be null. List of query parameters to be reused by the specific scheme part nvps)Sets the URI scheme specific part and append a list of NameValuePair to this part. |
| public URIBuilder | |
| public URIBuilder | Returns: this.
Deprecated
The use of clear-text passwords in
Sets URI user info as a combination of username and password.
URIs has been deprecated and is strongly
discouraged.
|
| pack-priv static List | |
| public String | Returns: this instance to a URI string.Overrides java. |
| charset | back to summary |
|---|---|
| private Charset charset | |
| encodedAuthority | back to summary |
|---|---|
| private String encodedAuthority | |
| encodedFragment | back to summary |
|---|---|
| private String encodedFragment | |
| encodedPath | back to summary |
|---|---|
| private String encodedPath | |
| encodedQuery | back to summary |
|---|---|
| private String encodedQuery | |
| encodedSchemeSpecificPart | back to summary |
|---|---|
| private String encodedSchemeSpecificPart | |
| encodedUserInfo | back to summary |
|---|---|
| private String encodedUserInfo | |
| fragment | back to summary |
|---|---|
| private String fragment | |
| host | back to summary |
|---|---|
| private String host | |
| PARAM_VALUE_SEPARATOR | back to summary |
|---|---|
| private static final char PARAM_VALUE_SEPARATOR | |
| PATH_SEPARATOR | back to summary |
|---|---|
| private static final char PATH_SEPARATOR | |
| PATH_SEPARATORS | back to summary |
|---|---|
| private static final BitSet PATH_SEPARATORS | |
| pathRootless | back to summary |
|---|---|
| private boolean pathRootless | |
| pathSegments | back to summary |
|---|---|
| private List<String> pathSegments | |
| port | back to summary |
|---|---|
| private int port | |
| query | back to summary |
|---|---|
| private String query | |
| QUERY_PARAM_SEPARATOR | back to summary |
|---|---|
| private static final char QUERY_PARAM_SEPARATOR | |
| QUERY_PARAM_SEPARATORS | back to summary |
|---|---|
| private static final BitSet QUERY_PARAM_SEPARATORS | |
| QUERY_VALUE_SEPARATORS | back to summary |
|---|---|
| private static final BitSet QUERY_VALUE_SEPARATORS | |
| queryParams | back to summary |
|---|---|
| private List<NameValuePair> queryParams | |
| scheme | back to summary |
|---|---|
| private String scheme | |
| userInfo | back to summary |
|---|---|
| private String userInfo | |
| URIBuilder | back to summary |
|---|---|
| public URIBuilder() Constructs an empty instance. | |
| URIBuilder | back to summary |
|---|---|
| public URIBuilder(final String uriString) throws URISyntaxException Constructs an instance from the string which must be a valid URI.
| |
| URIBuilder | back to summary |
|---|---|
| public URIBuilder(final URI uri) Constructs an instance from the provided URI.
| |
| URIBuilder | back to summary |
|---|---|
| public URIBuilder(final String uriString, final Charset charset) throws URISyntaxException Constructs an instance from the string which must be a valid URI.
| |
| URIBuilder | back to summary |
|---|---|
| public URIBuilder(final URI uri, final Charset charset) Constructs an instance from the provided URI.
| |
| addParameter | back to summary |
|---|---|
| public URIBuilder addParameter(final String param, final String value) Adds parameter to URI query. The parameter name and value are expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
| |
| addParameter | back to summary |
|---|---|
| public URIBuilder addParameter(final NameValuePair nameValuePair) Adds parameter to URI query. The parameter name and value are expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
| |
| addParameters | back to summary |
|---|---|
| public URIBuilder addParameters(final List<NameValuePair> nameValuePairs) Adds URI query parameters. The parameter name / values are expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
| |
| appendPath | back to summary |
|---|---|
| public URIBuilder appendPath(final String path) Appends path to URI. The value is expected to be unescaped and may contain non ASCII characters.
| |
| appendPathSegments | back to summary |
|---|---|
| public URIBuilder appendPathSegments(final String... pathSegments) Appends segments URI path. The value is expected to be unescaped and may contain non ASCII characters.
| |
| appendPathSegments | back to summary |
|---|---|
| public URIBuilder appendPathSegments(final List<String> pathSegments) Appends segments to URI path. The value is expected to be unescaped and may contain non ASCII characters.
| |
| build | back to summary |
|---|---|
| public URI build() throws URISyntaxException Builds a | |
| buildString | back to summary |
|---|---|
| private String buildString() | |
| clearParameters | back to summary |
|---|---|
| public URIBuilder clearParameters() Clears URI query parameters.
| |
| digestURI | back to summary |
|---|---|
| private void digestURI(final URI uri, final Charset charset) | |
| formatPath | back to summary |
|---|---|
| pack-priv static void formatPath(final StringBuilder buf, final Iterable<String> segments, final boolean rootless, final Charset charset) | |
| formatQuery | back to summary |
|---|---|
| pack-priv static void formatQuery(final StringBuilder buf, final Iterable<? extends NameValuePair> params, final Charset charset, final boolean blankAsPlus) | |
| getAuthority | back to summary |
|---|---|
| public URIAuthority getAuthority() Gets the authority.
| |
| getCharset | back to summary |
|---|---|
| public Charset getCharset() Gets the Charset.
| |
| getFirstQueryParam | back to summary |
|---|---|
| public NameValuePair getFirstQueryParam(final String name) Gets the first
| |
| getFragment | back to summary |
|---|---|
| public String getFragment() Gets the fragments.
| |
| getHost | back to summary |
|---|---|
| public String getHost() Gets the host portion of the
| |
| getPath | back to summary |
|---|---|
| public String getPath() Gets the path.
| |
| getPathSegments | back to summary |
|---|---|
| public List Gets the path segments. | |
| getPort | back to summary |
|---|---|
| public int getPort() Gets the port.
| |
| getQueryParams | back to summary |
|---|---|
| public List Gets the query parameters as a List.
| |
| getScheme | back to summary |
|---|---|
| public String getScheme() Gets the scheme.
| |
| getSchemeSpecificPart | back to summary |
|---|---|
| public String getSchemeSpecificPart() Gets the scheme specific part.
| |
| getUserInfo | back to summary |
|---|---|
| public String getUserInfo() Gets the user info.
| |
| isAbsolute | back to summary |
|---|---|
| public boolean isAbsolute() Tests whether the URI is absolute.
| |
| isOpaque | back to summary |
|---|---|
| public boolean isOpaque() Tests whether the URI is opaque.
| |
| isPathEmpty | back to summary |
|---|---|
| public boolean isPathEmpty() Tests whether the path is empty.
| |
| isQueryEmpty | back to summary |
|---|---|
| public boolean isQueryEmpty() Tests whether the query is empty.
| |
| localhost | back to summary |
|---|---|
| public static URIBuilder localhost() throws UnknownHostException Creates a new builder for the host
| |
| loopbackAddress | back to summary |
|---|---|
| public static URIBuilder loopbackAddress() Creates a new builder for the host | |
| normalizeSyntax | back to summary |
|---|---|
| public URIBuilder normalizeSyntax() Normalizes syntax of URI components if the URI is considered non-opaque (the path component has a root):
| |
| parsePath | back to summary |
|---|---|
| pack-priv static List | |
| parseQuery | back to summary |
|---|---|
| pack-priv static List | |
| removeParameter | back to summary |
|---|---|
| public URIBuilder removeParameter(final String param) Removes parameter of URI query if set. The parameter name is expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present, even when no parameter was actually removed.
| |
| removeQuery | back to summary |
|---|---|
| public URIBuilder removeQuery() Removes URI query.
| |
| setAuthority | back to summary |
|---|---|
| public URIBuilder setAuthority(final NamedEndpoint authority) Sets the authority.
| |
| setAuthority | back to summary |
|---|---|
| public URIBuilder setAuthority(final URIAuthority authority) Sets the authority.
| |
| setCharset | back to summary |
|---|---|
| public URIBuilder setCharset(final Charset charset) Sets the Charset.
| |
| setCustomQuery | back to summary |
|---|---|
| public URIBuilder setCustomQuery(final String query) Sets custom URI query. The value is expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove query parameters if present.
| |
| setFragment | back to summary |
|---|---|
| public URIBuilder setFragment(final String fragment) Sets URI fragment. The value is expected to be unescaped and may contain non ASCII characters.
| |
| setHost | back to summary |
|---|---|
| public URIBuilder setHost(final InetAddress host) Sets URI host.
| |
| setHost | back to summary |
|---|---|
| public URIBuilder setHost(final String host) Sets URI host. The input value must not already be URI encoded, for example
| |
| setHttpHost | back to summary |
|---|---|
| public URIBuilder setHttpHost(final HttpHost httpHost) Sets the scheme, host name, and port.
| |
| setParameter | back to summary |
|---|---|
| public URIBuilder setParameter(final String param, final String value) Sets parameter of URI query overriding existing value if set. The parameter name and value are expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
| |
| setParameters | back to summary |
|---|---|
| public URIBuilder setParameters(final List<NameValuePair> nameValuePairs) Sets URI query parameters. The parameter name / values are expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
| |
| setParameters | back to summary |
|---|---|
| public URIBuilder setParameters(final NameValuePair... nameValuePairs) Sets URI query parameters. The parameter name / values are expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
| |
| setPath | back to summary |
|---|---|
| public URIBuilder setPath(final String path) Sets URI path. The value is expected to be unescaped and may contain non ASCII characters.
| |
| setPathSegments | back to summary |
|---|---|
| public URIBuilder setPathSegments(final String... pathSegments) Sets URI path. The value is expected to be unescaped and may contain non ASCII characters.
| |
| setPathSegments | back to summary |
|---|---|
| public URIBuilder setPathSegments(final List<String> pathSegments) Sets URI path. The value is expected to be unescaped and may contain non ASCII characters.
| |
| setPathSegmentsRootless | back to summary |
|---|---|
| public URIBuilder setPathSegmentsRootless(final String... pathSegments) Sets rootless URI path (the first segment does not start with a /). The value is expected to be unescaped and may contain non ASCII characters.
| |
| setPathSegmentsRootless | back to summary |
|---|---|
| public URIBuilder setPathSegmentsRootless(final List<String> pathSegments) Sets rootless URI path (the first segment does not start with a /). The value is expected to be unescaped and may contain non ASCII characters.
| |
| setPort | back to summary |
|---|---|
| public URIBuilder setPort(final int port) Sets URI port.
| |
| setScheme | back to summary |
|---|---|
| public URIBuilder setScheme(final String scheme) Sets URI scheme.
| |
| setSchemeSpecificPart | back to summary |
|---|---|
| public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart) Sets the URI scheme specific part.
| |
| setSchemeSpecificPart | back to summary |
|---|---|
| public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart, final NameValuePair... nvps) Sets the URI scheme specific part and append a variable arguments list of NameValuePair instance(s) to this part.
| |
| setSchemeSpecificPart | back to summary |
|---|---|
| public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart, final List<NameValuePair> nvps) Sets the URI scheme specific part and append a list of NameValuePair to this part.
| |
| setUserInfo | back to summary |
|---|---|
| public URIBuilder setUserInfo(final String userInfo) Sets URI user info. The value is expected to be unescaped and may contain non ASCII characters.
| |
| setUserInfo | back to summary |
|---|---|
| public URIBuilder setUserInfo(final String username, final String password)
Deprecated The use of clear-text passwords in Sets URI user info as a combination of username and password. These values are expected to be unescaped and may contain non ASCII characters.
| |
| splitPath | back to summary |
|---|---|
| pack-priv static List | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Converts this instance to a URI string. | |