|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.clerezza.triaxrs.util.uri.UriEncoder
public final class UriEncoder
URI Encoding and Decoding
| Field Summary | |
|---|---|
static boolean[] |
fragmentChars
|
static boolean[] |
matrixChars
|
static boolean[] |
pathChars
|
static boolean[] |
queryChars
|
static boolean[] |
queryParamChars
|
static boolean[] |
segmentChars
|
static boolean[] |
unreservedChars
Unreserved characters according to RFC 3986. |
static boolean[] |
uriChars
|
static boolean[] |
uriTemplateChars
|
static boolean[] |
userInfoChars
|
| Method Summary | |
|---|---|
static javax.ws.rs.core.MultivaluedMap<String,String> |
decodeMultivaluedMap(javax.ws.rs.core.MultivaluedMap<String,String> map,
boolean decodeKeys)
|
static javax.ws.rs.core.MultivaluedMap<String,String> |
decodeMultivaluedMapValues(javax.ws.rs.core.MultivaluedMap<String,String> map)
|
static String |
decodeQuery(String string)
Decode US-ASCII uri according to RFC 3986 and replaces all occurrences of the '+' sign with spaces. |
static String |
decodeString(String string)
Decode US-ASCII uri according to RFC 3986. |
static String |
encodeFragment(String fragment,
boolean relax)
Encode a fragment string according to RFC 3986. |
static String |
encodeMatrix(String matrix,
boolean relax)
Encode a matrix parameter (name or value) according to RFC 3986. |
static String |
encodePath(String path,
boolean relax)
Encode a complete path string according to RFC 3986. |
static String |
encodePathSegment(String segment,
boolean relax)
Encode a path segment (without matrix parameters) according to RFC 3986. |
static String |
encodeQuery(String query,
boolean relax)
Encode a complete query string according to RFC 3986. |
static String |
encodeQueryParam(String queryParam,
boolean relax)
Encode a query parameter (name or value) according to RFC 3986. |
static String |
encodeString(String string)
Encode all characters other than unreserved according to RFC 3986. |
static String |
encodeUri(String uri,
boolean relax)
Encode a uri according to RFC 3986, escaping all reserved characters. |
static String |
encodeUriTemplate(String uriTemplate,
boolean relax)
Encode a uri template according to RFC 3986, escaping all reserved characters, except for '{' and '}'. |
static String |
encodeUserInfo(String userInfo,
boolean relax)
Encode user info according to RFC 3986. |
static String |
normalize(String string)
Decodes only the unreserved chars, according to RFC 3986 section 6.2.2.2 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean[] unreservedChars
public static final boolean[] userInfoChars
public static final boolean[] segmentChars
public static final boolean[] matrixChars
public static final boolean[] pathChars
public static final boolean[] queryChars
public static final boolean[] queryParamChars
public static final boolean[] fragmentChars
public static final boolean[] uriChars
public static final boolean[] uriTemplateChars
| Method Detail |
|---|
public static String encodeString(String string)
string - string to encode
public static String encodeUserInfo(String userInfo,
boolean relax)
userInfo - the user info to encoderelax - if true, then any sequence of chars in the input string that
have the form '%XX', where XX are two HEX digits, will not be
encoded
public static String encodePathSegment(String segment,
boolean relax)
segment - the segment (without matrix parameters) to encoderelax - if true, then any sequence of chars in the input string that
have the form '%XX', where XX are two HEX digits, will not be
encoded
public static String encodeMatrix(String matrix,
boolean relax)
matrix - the matrix parameter (name or value) to encoderelax - if true, then any sequence of chars in the input string that
have the form '%XX', where XX are two HEX digits, will not be
encoded
public static String encodePath(String path,
boolean relax)
path - the path string to encoderelax - if true, then any sequence of chars in the input string that
have the form '%XX', where XX are two HEX digits, will not be
encoded
public static String encodeQueryParam(String queryParam,
boolean relax)
queryParam - the query parameter string to encoderelax - if true, then any sequence of chars in the input string that
have the form '%XX', where XX are two HEX digits, will not be
encoded
public static String encodeQuery(String query,
boolean relax)
query - the query string to encoderelax - if true, then any sequence of chars in the input string that
have the form '%XX', where XX are two HEX digits, will not be
encoded
public static String encodeFragment(String fragment,
boolean relax)
fragment - the fragment string to encoderelax - if true, then any sequence of chars in the input string that
have the form '%XX', where XX are two HEX digits, will not be
encoded
public static String encodeUri(String uri,
boolean relax)
uri - string to encoderelax - if true, then any sequence of chars in the input of the form
'%XX', where XX are two HEX digits, will not be encoded.
public static String encodeUriTemplate(String uriTemplate,
boolean relax)
uriTemplate - template to encoderelax - if true, then any sequence of chars in the input of the form
'%XX', where XX are two HEX digits, will not be encoded.
public static String decodeQuery(String string)
string - query string to decode
public static String decodeString(String string)
string - US-ASCII uri to decode
public static String normalize(String string)
string - US-ASCII uri to decode
public static javax.ws.rs.core.MultivaluedMap<String,String> decodeMultivaluedMapValues(javax.ws.rs.core.MultivaluedMap<String,String> map)
public static javax.ws.rs.core.MultivaluedMap<String,String> decodeMultivaluedMap(javax.ws.rs.core.MultivaluedMap<String,String> map,
boolean decodeKeys)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||