|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.rest.client.RestClientUtils
public class RestClientUtils
Utility methods for the Rest client classes.
Exception| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.lang.String |
NUM_CHAR_REF_END
|
protected static java.lang.String |
NUM_CHAR_REF_START
|
static java.util.regex.Pattern |
RESERVED_URI_CHARS
|
| Constructor Summary | |
|---|---|
RestClientUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
containsNumCharRefs(java.lang.String pVal)
Checks to see if a string contains any numeric character references of the form N; where N is either
a decimal or hexidecimal value of a character's unicode code point. |
static boolean |
isBlank(java.lang.String pStr)
Return true if pStr is null, the empty string, or consists entirely of whitespace where whitespace is defined by the String.trim method. |
static java.lang.String |
numCharRefToUnicode(java.lang.String pVal)
Converts any unicode values in a string encoded as numeric character references into their literal unicode character values. |
static java.lang.String |
urlEncodeDisallowedOnly(java.lang.String pUrl)
performs a percent-encoding on only the disallowed characters in a URL. |
static java.lang.String |
urlToPunycode(java.lang.String pURL)
converts a url containing literal unicode characters, or numeric character references into punycode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String CLASS_VERSION
protected static final java.lang.String NUM_CHAR_REF_START
protected static final java.lang.String NUM_CHAR_REF_END
public static java.util.regex.Pattern RESERVED_URI_CHARS
| Constructor Detail |
|---|
public RestClientUtils()
| Method Detail |
|---|
public static boolean isBlank(java.lang.String pStr)
public static java.lang.String urlToPunycode(java.lang.String pURL)
pURL - the url to transform
public static java.lang.String urlEncodeDisallowedOnly(java.lang.String pUrl)
throws java.io.UnsupportedEncodingException
pUrl - a URL to be percent encoded
java.io.UnsupportedEncodingException - if the UTF-8 encoding is not supportedpublic static java.lang.String numCharRefToUnicode(java.lang.String pVal)
N; where N is either the decimal or hexidecimal value of a
character's unicode code point.
For instance, the numeric character reference of ᄌ would
be converted into the Korean Hangul Jamo character of choseong cieuc.
pVal - A string potentially containing numeric character references
public static boolean containsNumCharRefs(java.lang.String pVal)
N; where N is either
a decimal or hexidecimal value of a character's unicode code point.
pVal - the string to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||