| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static enum | UriComponent.
The URI component type. |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean[][] | |
| private static final char[] | |
| private static final int[] | |
| private static final String[] | |
| private static final String[] | |
| private static final String[] | |
| private static final Charset |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static String | _encode(final String s, final UriComponent.
|
| private static int | |
| private static void | |
| private static void | |
| public static String | Returns: the encoded string.the string to be encoded. s, final UriComponent.the URI component type identifying the ASCII characters that must be percent-encoded. tContextually encodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding. |
| public static String | Returns: the encoded string.the string to be encoded. s, final UriComponent.the URI component type identifying the ASCII characters that must be percent-encoded. t,true if the encoded string contains URI template variables template)Contextually encodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding. |
| public static String | Returns: the decoded string.the string to be decoded. s, final UriComponent.the URI component type, may be null. tDecodes characters of a string that are percent-encoded octets using UTF-8 decoding (if needed). |
| private static String | |
| private static int | |
| private static int | |
| private static String | |
| public static MultivaluedMap | Returns: the multivalued map of matrix parameters.the path segment component in encoded form. pathSegment, final boolean true if the matrix parameters of the path segment component should be in decoded form. decode)Decode the matrix component of a URI path segment. |
| private static void | decodeMatrixParam(final MultivaluedMap<String, String> params, final String param, final boolean decode)
|
| private static int | Returns: the index to the next unchecked character in the string to decodeDecodes octets to characters using the UTF-8 decoding and appends the characters to a StringBuffer. |
| public static List | Returns: the list of path segments.the URI. If the path component is an absolute path component
then the leading '/' is ignored and is not considered a delimiator
of a path segment. u, final boolean true if the path segments of the path component
should be in decoded form. decode)Decode the path component of a URI as path segments. |
| public static List | Returns: the list of path segments.the path component in encoded form. path, final boolean true if the path segments of the path component
should be in decoded form. decode)Decode the path component of a URI as path segments. |
| public static void | decodePathSegment(final List<PathSegment>
mutable list of path segments. segments, final String path segment to be decoded. segment, final boolean true if the path segment should be in a decoded form.Decode the path segment and add it to the list of path segments. |
| private static ByteBuffer | decodePercentEncodedOctets(final String s, int i, ByteBuffer bb)
Decode a continuous sequence of percent encoded octets. |
| public static MultivaluedMap | Returns: the multivalued map of query parameters.the URI. u, final boolean true if the returned query parameter values of the query component
should be in decoded form.Decode the query component of a URI. |
| public static MultivaluedMap | Returns: the multivalued map of query parameters.the query component in encoded form. q, final boolean true if the returned query parameter values of the query component
should be in decoded form.Decode the query component of a URI. |
| public static MultivaluedMap | Returns: the multivalued map of query parameters.the query component in encoded form. q, final boolean true if the returned query parameter names of the query component
should be in decoded form.true if the returned query parameter values of the query component
should be in decoded form.Decode the query component of a URI. |
| private static void | decodeQueryParam(final MultivaluedMap<String, String> params, final String param, final boolean decodeNames, final boolean decodeValues)
|
| private static String | |
| public static String | Returns: the encoded string.the string to be encoded. s, final UriComponent.the URI component type identifying the ASCII characters that
must be percent-encoded. tEncodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding. |
| public static String | Returns: the encoded string.the string to be encoded. s, final UriComponent.the URI component type identifying the ASCII characters that
must be percent-encoded. t,true if the encoded string contains URI template variables template)Encodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding. |
| public static String | Returns: the string with encoded template parameters names.the string with zero or more template parameters names s)Encodes a string with template parameters names present, specifically the characters '{' and '}' will be percent-encoded. |
| public static String | Returns: Request-Uri representation or null if uri is not provided.uri to obtain uri)Request-Uri from.Return the |
| private static boolean[] | |
| private static boolean[][] | |
| private static int[] | |
| public static boolean | Returns: The isc is a hexadecimal character (e.g. 0, 5, a, A, f, ...)Any character c)Checks whether the character |
| public static boolean | Returns: true if the encoded string is valid, otherwise false.the encoded string. s, final UriComponent.the URI component type identifying the legal characters. tValidates the legal characters of a percent-encoded string that represents a URI component type. |
| public static boolean | Returns: true if the encoded string is valid, otherwise false.the encoded string. s, final UriComponent.the URI component type identifying the legal characters. t,true if the encoded string contains URI template variables template)Validates the legal characters of a percent-encoded string that represents a URI component type. |
| public static void | validate(final String
the encoded string. s, final UriComponent.the URI component type identifying the legal characters. tValidates the legal characters of a percent-encoded string that represents a URI component type. |
| public static void | validate(final String
the encoded string. s, final UriComponent.the URI component type identifying the legal characters. t,true if the encoded string contains URI template variables template)Validates the legal characters of a percent-encoded string that represents a URI component type. |
| ENCODING_TABLES | back to summary |
|---|---|
| private static final boolean[][] ENCODING_TABLES | |
| HEX_DIGITS | back to summary |
|---|---|
| private static final char[] HEX_DIGITS | |
| HEX_TABLE | back to summary |
|---|---|
| private static final int[] HEX_TABLE | |
| SCHEME | back to summary |
|---|---|
| private static final String[] SCHEME | |
| SUB_DELIMS | back to summary |
|---|---|
| private static final String[] SUB_DELIMS | |
| UNRESERVED | back to summary |
|---|---|
| private static final String[] UNRESERVED | |
| UTF_8_CHARSET | back to summary |
|---|---|
| private static final Charset UTF_8_CHARSET | |
| UriComponent | back to summary |
|---|---|
| private UriComponent() | |
| _encode | back to summary |
|---|---|
| private static String _encode(final String s, final UriComponent. | |
| _valid | back to summary |
|---|---|
| private static int _valid(final String s, final UriComponent. | |
| appendPercentEncodedOctet | back to summary |
|---|---|
| private static void appendPercentEncodedOctet(final StringBuilder sb, final int b) | |
| appendUTF8EncodedCharacter | back to summary |
|---|---|
| private static void appendUTF8EncodedCharacter(final StringBuilder sb, final char c) | |
| contextualEncode | back to summary |
|---|---|
| public static String contextualEncode(final String s, final UriComponent. Contextually encodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding. Percent-encoded characters will be recognized and not double encoded.
| |
| contextualEncode | back to summary |
|---|---|
| public static String contextualEncode(final String s, final UriComponent. Contextually encodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding. Percent-encoded characters will be recognized and not double encoded.
| |
| decode | back to summary |
|---|---|
| public static String decode(final String s, final UriComponent. Decodes characters of a string that are percent-encoded octets using UTF-8 decoding (if needed). It is assumed that the string is valid according to an (unspecified) URI component type. If a sequence of contiguous percent-encoded octets is not a valid UTF-8 character then the octets are replaced with '�'. If the URI component is of type HOST then any "%" found between "[]" is left alone. It is an IPv6 literal with a scope_id. If the URI component is of type QUERY_PARAM then any "+" is decoded as as ' '.
| |
| decode | back to summary |
|---|---|
| private static String decode(final String s, final int n) | |
| decodeHex | back to summary |
|---|---|
| private static int decodeHex(final String s, final int i) | |
| decodeHex | back to summary |
|---|---|
| private static int decodeHex(final char c) | |
| decodeHost | back to summary |
|---|---|
| private static String decodeHost(final String s, final int n) | |
| decodeMatrix | back to summary |
|---|---|
| public static MultivaluedMap Decode the matrix component of a URI path segment.
| |
| decodeMatrixParam | back to summary |
|---|---|
private static void decodeMatrixParam(final MultivaluedMap<String, String> params, final String param, final boolean decode)
| |
| decodeOctets | back to summary |
|---|---|
| private static int decodeOctets(final int i, final ByteBuffer bb, final StringBuilder sb) Decodes octets to characters using the UTF-8 decoding and appends the characters to a StringBuffer.
| |
| decodePath | back to summary |
|---|---|
| public static List Decode the path component of a URI as path segments.
| |
| decodePath | back to summary |
|---|---|
| public static List Decode the path component of a URI as path segments. Any '/' character in the path is considered to be a deliminator between two path segments. Thus if the path is '/' then the path segment list will contain two empty path segments. If the path is "//" then the path segment list will contain three empty path segments. If the path is "/a/" the path segment list will consist of the following path segments in order: "", "a" and "".
| |
| decodePathSegment | back to summary |
|---|---|
| public static void decodePathSegment(final List<PathSegment> segments, final String segment, final boolean decode) Decode the path segment and add it to the list of path segments.
| |
| decodePercentEncodedOctets | back to summary |
|---|---|
| private static ByteBuffer decodePercentEncodedOctets(final String s, int i, ByteBuffer bb) Decode a continuous sequence of percent encoded octets. Assumes the index, i, starts that the first hex digit of the first percent-encoded octet. | |
| decodeQuery | back to summary |
|---|---|
| public static MultivaluedMap Decode the query component of a URI.
Query parameter names in the returned map are always decoded. Decoding of query parameter
values can be controlled using the
| |
| decodeQuery | back to summary |
|---|---|
| public static MultivaluedMap Decode the query component of a URI.
Query parameter names in the returned map are always decoded. Decoding of query parameter
values can be controlled using the
| |
| decodeQuery | back to summary |
|---|---|
| public static MultivaluedMap Decode the query component of a URI.
Decoding of query parameter names and values can be controlled using the
| |
| decodeQueryParam | back to summary |
|---|---|
private static void decodeQueryParam(final MultivaluedMap<String, String> params, final String param, final boolean decodeNames, final boolean decodeValues)
| |
| decodeQueryParam | back to summary |
|---|---|
| private static String decodeQueryParam(final String s, final int n) | |
| encode | back to summary |
|---|---|
| public static String encode(final String s, final UriComponent. Encodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding.
| |
| encode | back to summary |
|---|---|
| public static String encode(final String s, final UriComponent. Encodes the characters of string that are either non-ASCII characters or are ASCII characters that must be percent-encoded using the UTF-8 encoding.
| |
| encodeTemplateNames | back to summary |
|---|---|
| public static String encodeTemplateNames(String s) Encodes a string with template parameters names present, specifically the characters '{' and '}' will be percent-encoded. | |
| fullRelativeUri | back to summary |
|---|---|
| public static String fullRelativeUri(final URI uri) Return the <Method> <Request-URI> HTTP/<Version> (e.g. GET /auth;foo=bar/hello?foo=bar HTTP/1.1) | |
| initEncodingTable | back to summary |
|---|---|
| private static boolean[] initEncodingTable(final List<String> allowed) | |
| initEncodingTables | back to summary |
|---|---|
| private static boolean[][] initEncodingTables() | |
| initHexTable | back to summary |
|---|---|
| private static int[] initHexTable() | |
| isHexCharacter | back to summary |
|---|---|
| public static boolean isHexCharacter(final char c) Checks whether the character
| |
| valid | back to summary |
|---|---|
| public static boolean valid(final String s, final UriComponent. Validates the legal characters of a percent-encoded string that represents a URI component type.
| |
| valid | back to summary |
|---|---|
| public static boolean valid(final String s, final UriComponent. Validates the legal characters of a percent-encoded string that represents a URI component type.
| |
| validate | back to summary |
|---|---|
| public static void validate(final String s, final UriComponent. Validates the legal characters of a percent-encoded string that represents a URI component type.
| |
| validate | back to summary |
|---|---|
| public static void validate(final String s, final UriComponent. Validates the legal characters of a percent-encoded string that represents a URI component type.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final PathSegment | |
| private final MultivaluedMap | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | PathSegmentImpl(final String path, final boolean decode, final MultivaluedMap<String, String> matrixParameters)
|
| Modifier and Type | Method and Description |
|---|---|
| public MultivaluedMap | getMatrixParameters()
Implements org. Get a map of the matrix parameters associated with the path segment. |
| public String | getPath()
Implements org. Get the path segment. |
| public String |
| EMPTY_PATH_SEGMENT | back to summary |
|---|---|
| private static final PathSegment EMPTY_PATH_SEGMENT | |
| matrixParameters | back to summary |
|---|---|
| private final MultivaluedMap<String, String> matrixParameters | |
| path | back to summary |
|---|---|
| private final String path | |
| PathSegmentImpl | back to summary |
|---|---|
| pack-priv PathSegmentImpl(final String path, final boolean decode) | |
| PathSegmentImpl | back to summary |
|---|---|
| pack-priv PathSegmentImpl(final String path, final boolean decode, final MultivaluedMap<String, String> matrixParameters) | |
| getMatrixParameters | back to summary |
|---|---|
| public MultivaluedMap Implements org. Doc from org. Get a map of the matrix parameters associated with the path segment. The map keys are the names of the matrix parameters with any percent-escaped octets decoded.
| |
| getPath | back to summary |
|---|---|
| public String getPath() Implements org. Doc from org. Get the path segment. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| public static final UriComponent. | AUTHORITY
The URI authority component type. |
| public static final UriComponent. | FRAGMENT
The URI fragment component type. |
| public static final UriComponent. | HOST
The URI host component type. |
| public static final UriComponent. | MATRIX_PARAM
The URI path component type that is a matrix parameter. |
| public static final UriComponent. | PATH
The URI path component type. |
| public static final UriComponent. | PATH_SEGMENT
The URI path component type that is a path segment. |
| public static final UriComponent. | PORT
The URI port component type. |
| public static final UriComponent. | QUERY
The URI query component type. |
| public static final UriComponent. | QUERY_PARAM
The URI query component type that is a query parameter, space character is encoded as |
| public static final UriComponent. | QUERY_PARAM_SPACE_ENCODED
The URI query component type that is a query parameter, space character is encoded as |
| public static final UriComponent. | SCHEME
The URI scheme component type. |
| public static final UriComponent. | UNRESERVED
ALPHA / DIGIT / "-" / "." / "_" / "~" characters. |
| public static final UriComponent. | USER_INFO
The URI user info component type. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static UriComponent. | |
| public static UriComponent. |
| AUTHORITY | back to summary |
|---|---|
| public static final UriComponent. The URI authority component type. | |
| FRAGMENT | back to summary |
|---|---|
| public static final UriComponent. The URI fragment component type. | |
| HOST | back to summary |
|---|---|
| public static final UriComponent. The URI host component type. | |
| MATRIX_PARAM | back to summary |
|---|---|
| public static final UriComponent. The URI path component type that is a matrix parameter. | |
| PATH | back to summary |
|---|---|
| public static final UriComponent. The URI path component type. | |
| PATH_SEGMENT | back to summary |
|---|---|
| public static final UriComponent. The URI path component type that is a path segment. | |
| PORT | back to summary |
|---|---|
| public static final UriComponent. The URI port component type. | |
| QUERY | back to summary |
|---|---|
| public static final UriComponent. The URI query component type. | |
| QUERY_PARAM | back to summary |
|---|---|
| public static final UriComponent. The URI query component type that is a query parameter, space character is encoded as | |
| QUERY_PARAM_SPACE_ENCODED | back to summary |
|---|---|
| public static final UriComponent. The URI query component type that is a query parameter, space character is encoded as | |
| SCHEME | back to summary |
|---|---|
| public static final UriComponent. The URI scheme component type. | |
| UNRESERVED | back to summary |
|---|---|
| public static final UriComponent. ALPHA / DIGIT / "-" / "." / "_" / "~" characters. | |
| USER_INFO | back to summary |
|---|---|
| public static final UriComponent. The URI user info component type. | |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static UriComponent. | |
| values | back to summary |
|---|---|
| public static UriComponent. | |