Notes on using the methods of the UriBuilder class are as follows.
Note that the URI of the UriBuilder object in the description is, when calling any method, the URI that is already built in the UriBuilder object when any of the previous methods were called.
- When using the methods of the UriBuilder class, see the JAX-RS API documentation or RFC 2396, 2732 and then use the characters and formats that can be used in the arguments of each method. If the characters in an argument or format of an argument is invalid, an exception might be thrown when calling methods of the UriBuilder class or the build(Object... values) method. Note that any invalid characters are automatically percent encoded in the following methods (already percent encoded characters are not further percent encoded).
- fragment(java.lang.String fragment)
- host(String host)
- path(String path)
- queryParam(java.lang.String name, java.lang.Object... values)
- replacePath(String path)
- replaceQuery(java.lang.String query)
- replaceQueryParam(java.lang.String name, java.lang.Object... values)
- segment(String... segments)
- userInfo(String ui)
- Unknown URIs are not supported. Use the methods of the URI Builder claass only for the hierarchical URIs.
- The template parameters are not supported. The operation is not guaranteed if arguments of the methods contain template parameters.
- Do not specify arguments in the build(Object... values) method. The operation is not guaranteed if arguments are specified and then called.
- The order of query parameters is not maintained.
- When using the port(int port) method, no exception is thrown even if you specify a variable value greater than 65535. The IllegalArgumentException exception, however, is thrown if you specify a variable value smaller than -1.
- When using the replaceQuery(String query) method, the operation is not guaranteed if nothing is available to replace with the URI of the UriBuilder object.
- If you specify the query parameter that is not included in the URI of the UriBuilder object in the arguments of the replaceQueryParam(String name, Object... values) method, the specified parameter is added to the URI.
- If you specify null in the value arguments of the replaceQueryParam(String name, Object... values) method, the IllegalArgumentException exception is thrown without eliminating the existing query parameter, which differs from the description in the API documentation of the JAX-RS 1.1 standard specifications.
- If you specify null in the arguments of the replacePath(String path) method, the IllegalArgumentException exception is thrown without eliminating the existing query parameter, which differs from the description in the API documentation of the JAX-RS 1.1 standard specifications.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.