public static enum URLEncoding.Impl extends Enum<URLEncoding.Impl> implements URLEncoding
URLEncoding.Impl
Enum Constant and Description |
---|
JAVA
uses Java's URLEncoder and URLDecoder.
|
NONE
Does nothing
|
RFC3986
strict RFC3986, e.g.
|
COMMA, EMPTY, EQUALS, RFC3986_CHANGES, UTF8_CHARSET
Modifier and Type | Method and Description |
---|---|
Map.Entry<String,String[]> |
decodeKVs(String keyPlusValues)
Decodes a String of the format key[=][value1][,value2...]
|
String |
encodeKVs(String key,
Object... values)
Encodes into key=value1,value2...
|
static URLEncoding |
getInstance(boolean doEncode,
boolean useStrictRFC3986)
Utility to obtain the correct encoder
|
static String |
toStringNullsBecome(Object o,
String nullsBecome)
Like @link
String.valueOf(Object) but you get to pick the result for nulls |
static URLEncoding.Impl |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static URLEncoding.Impl[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
decode, encode
public static final URLEncoding.Impl NONE
public static final URLEncoding.Impl JAVA
URLEncoder
,
URLDecoder
public static final URLEncoding.Impl RFC3986
public static URLEncoding.Impl[] values()
for (URLEncoding.Impl c : URLEncoding.Impl.values()) System.out.println(c);
public static URLEncoding.Impl valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic Map.Entry<String,String[]> decodeKVs(String keyPlusValues)
URLEncoding
decodeKVs
in interface URLEncoding
public String encodeKVs(String key, Object... values)
URLEncoding
encodeKVs
in interface URLEncoding
public static URLEncoding getInstance(boolean doEncode, boolean useStrictRFC3986)
doEncode
- useStrictRFC3986
- public static String toStringNullsBecome(Object o, String nullsBecome)
String.valueOf(Object)
but you get to pick the result for nullso
- nullsBecome
- what String to return if o is null