public class EncodingUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static BitSet |
ASCII_QUERY_CHARS |
protected static char[] |
PUNCT_CHARS |
protected static String |
PUNCT_STRING |
protected static char[] |
RESERVED_CHARS |
protected static String |
RESERVED_STRING |
protected static BitSet |
RESTRICTED_CHARS |
protected static char[] |
UNRESERVE_CHARS |
| Constructor and Description |
|---|
EncodingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsURLSpecificCharacter(CharSequence in)
Encodes characters in the query or fragment part of the URI.
|
static CharSequence |
encodeUriQuery(CharSequence in)
Encodes characters in the query or fragment part of the URI.
|
static String |
getRestrictedChars()
Return the list of restricted chars.
|
protected static final BitSet ASCII_QUERY_CHARS
protected static final BitSet RESTRICTED_CHARS
protected static final char[] UNRESERVE_CHARS
protected static final String PUNCT_STRING
protected static final char[] PUNCT_CHARS
protected static final String RESERVED_STRING
protected static final char[] RESERVED_CHARS
public static String getRestrictedChars()
public static boolean containsURLSpecificCharacter(CharSequence in)
Unfortunately, an incoming URI sometimes has characters disallowed by the
spec. HttpClient insists that the outgoing proxied request has a valid
URI because it uses Java's URI. To be more forgiving, we must
escape the problematic characters. See the URI class for the spec.
in - example: name=value&foo=bar#fragmentpublic static CharSequence encodeUriQuery(CharSequence in)
Unfortunately, an incoming URI sometimes has characters disallowed by the
spec. HttpClient insists that the outgoing proxied request has a valid
URI because it uses Java's URI. To be more forgiving, we must
escape the problematic characters. See the URI class for the spec.
in - example: name=value&foo=bar#fragmentCharSequenceCopyright © 2016. All rights reserved.