public class EncodingUtilities extends Object
| Constructor and Description |
|---|
EncodingUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decodeString(String string)
Decode and return the specified pct-encoded String.
|
static String |
decodeXmlDataItems(String dataString) |
static String |
encodeUrlFragment(String fragmentString)
Encode the URL fragment section following
RFC 3986.
|
static String |
encodeUrlPathSegment(String segmentString)
Encode a URL path segment as required by the URL specifications (
RFC 3986 and RFC 1738 section 3.3).
|
static String |
encodeUrlQuerySegment(String segmentString)
Encode a URL query segment following the item-list / key-value convention:
query = "?" q-item *( "&" q-item)
q=item = q-segment [ "=" q-segment ]
|
public static String encodeUrlPathSegment(String segmentString)
java.net.URLEncoder.encode() which encodes according
to the x-www-form-urlencoded MIME format.segmentString: - the http URL path segment to encodepublic static String encodeUrlQuerySegment(String segmentString)
segmentString: - the http URL query segment to encodepublic static String encodeUrlFragment(String fragmentString)
fragmentString - public static String decodeString(String string) throws UnsupportedEncodingException
string - UnsupportedEncodingExceptionIllegalArgumentException - if a '%' character is not followed
by a valid 2-digit hexadecimal numberCopyright © 2020. All Rights Reserved.