public final class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static byte |
convertHexDigit(byte b)
Convert a byte character value to hexidecimal digit value.
|
static String |
normalize(String path,
boolean replaceBackSlash)
Normalize a relative URI path that may have relative values ("/./",
"/../", and so on ) it it.
|
static String |
urlDecode(byte[] bytes)
Decode and return the specified URL-encoded byte array.
|
static String |
urlDecode(byte[] bytes,
String enc)
Decode and return the specified URL-encoded byte array.
|
static String |
urlDecode(String str)
Decode and return the specified URL-encoded String.
|
static String |
urlDecode(String str,
String enc)
Decode and return the specified URL-encoded String.
|
public static String normalize(String path, boolean replaceBackSlash)
path - Relative path to be normalizedreplaceBackSlash - Should '\\' be replaced with '/'public static String urlDecode(String str)
str - The url-encoded stringIllegalArgumentException - if a '%' character is not followed
by a valid 2-digit hexadecimal numberpublic static String urlDecode(String str, String enc)
str - The url-encoded stringenc - The encoding to use; if null, the default encoding is usedIllegalArgumentException - if a '%' character is not followed
by a valid 2-digit hexadecimal numberpublic static String urlDecode(byte[] bytes)
bytes - The url-encoded byte arrayIllegalArgumentException - if a '%' character is not followed
by a valid 2-digit hexadecimal numberpublic static String urlDecode(byte[] bytes, String enc)
bytes - The url-encoded byte arrayenc - The encoding to use; if null, the default encoding is usedIllegalArgumentException - if a '%' character is not followed
by a valid 2-digit hexadecimal numberpublic static byte convertHexDigit(byte b)
b - the character value byteCopyright © 2017. All rights reserved.