|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,String>
com.dyuproject.util.http.UrlEncodedParameterMap
public final class UrlEncodedParameterMap
A parameter map where the values of the parameter names are url encoded on toString()
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary | |
---|---|
UrlEncodedParameterMap()
|
|
UrlEncodedParameterMap(String url)
|
Method Summary | |
---|---|
UrlEncodedParameterMap |
add(String key,
String value)
|
static String |
decode(String value)
Decodes (url encoding) the value with the default charset UTF-8. |
static String |
decode(String value,
int start,
int len,
String charset)
Decodes (url encoding) the value with the specified charset ,
starting at start with the length len . |
static String |
decode(String value,
String charset)
Decodes (url encoding) the value with the specified charset . |
static String |
encode(String value)
Encodes (url encoding) the value with the default charset UTF-8. |
static String |
encode(String value,
String charset)
Encodes (url encoding) the value with the specified charset . |
String |
encodedGet(String key)
Gets the url encoded value from the given key . |
static String |
encodeRFC3986(String value)
Encodes the value using RFC 3986 url encoding - which basically skips {'-', '.', '_', '~'}. |
static String |
encodeRFC3986(String value,
String charset)
Encodes the value with the given charset using RFC 3986
url encoding - which basically skips {'-', '.', '_', '~'}. |
String |
getEncoded(String key)
Gets the url encoded value from the given key . |
String |
getUrl()
|
byte[] |
getUrlFormEncodedBytes(String charset)
|
byte[] |
getUrlFormEncodedBytesRFC3986(String charset)
|
void |
prettyPrint(PrintStream out)
|
UrlEncodedParameterMap |
setUrl(String url)
|
String |
toString()
|
String |
toStringRFC3986()
|
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public UrlEncodedParameterMap()
public UrlEncodedParameterMap(String url)
Method Detail |
---|
public String getUrl()
public UrlEncodedParameterMap setUrl(String url)
public UrlEncodedParameterMap add(String key, String value)
public String toString()
toString
in class AbstractMap<String,String>
public String toStringRFC3986()
public byte[] getUrlFormEncodedBytes(String charset) throws UnsupportedEncodingException
UnsupportedEncodingException
public byte[] getUrlFormEncodedBytesRFC3986(String charset) throws UnsupportedEncodingException
UnsupportedEncodingException
public void prettyPrint(PrintStream out)
public String getEncoded(String key)
key
.
public String encodedGet(String key)
key
.
public static String encode(String value)
value
with the default charset UTF-8.
public static String encode(String value, String charset)
value
with the specified charset
.
public static String decode(String value)
value
with the default charset UTF-8.
public static String decode(String value, String charset)
value
with the specified charset
.
public static String decode(String value, int start, int len, String charset)
value
with the specified charset
,
starting at start
with the length len
.
public static String encodeRFC3986(String value)
public static String encodeRFC3986(String value, String charset)
charset
using RFC 3986
url encoding - which basically skips {'-', '.', '_', '~'}.
value
- string to encode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |