|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap org.mortbay.util.MultiMap org.mortbay.util.UrlEncoded
public class UrlEncoded
Handles coding of MIME "x-www-form-urlencoded". This class handles the encoding and decoding for either the query string of a URL or the _content of a POST HTTP request.
URLEncoder
,
Serialized FormConstructor Summary | |
---|---|
UrlEncoded()
|
|
UrlEncoded(String s)
|
|
UrlEncoded(String s,
String charset)
|
|
UrlEncoded(UrlEncoded url)
|
Method Summary | |
---|---|
Object |
clone()
|
void |
decode(String query)
|
void |
decode(String query,
String charset)
|
static String |
decodeString(String encoded)
Decode String with % encoding. |
static String |
decodeString(String encoded,
int offset,
int length,
String charset)
Decode String with % encoding. |
static String |
decodeString(String encoded,
String charset)
Decode String with % encoding. |
static void |
decodeTo(byte[] data,
int offset,
int length,
MultiMap map,
String charset)
Decoded parameters to Map. |
static void |
decodeTo(InputStream in,
MultiMap map,
String charset)
Decoded parameters to Map. |
static void |
decodeTo(String content,
MultiMap map)
|
static void |
decodeTo(String content,
MultiMap map,
String charset)
Decoded parameters to Map. |
String |
encode()
Encode Hashtable with % encoding. |
static String |
encode(MultiMap map,
String charset,
boolean equalsForNullValue)
Encode Hashtable with % encoding. |
String |
encode(String charset)
Encode Hashtable with % encoding. |
String |
encode(String charset,
boolean equalsForNullValue)
Encode Hashtable with % encoding. |
static String |
encodeString(String string)
Perform URL encoding. |
static String |
encodeString(String string,
String charset)
Perform URL encoding. |
Methods inherited from class org.mortbay.util.MultiMap |
---|
add, addValues, addValues, get, getString, getValue, getValues, put, putAll, putValues, putValues, removeValue, toStringArrayMap |
Methods inherited from class java.util.HashMap |
---|
clear, containsKey, containsValue, entrySet, isEmpty, keySet, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
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 UrlEncoded(UrlEncoded url)
public UrlEncoded()
public UrlEncoded(String s)
public UrlEncoded(String s, String charset)
Method Detail |
---|
public void decode(String query)
public void decode(String query, String charset)
public String encode()
public String encode(String charset)
public String encode(String charset, boolean equalsForNullValue)
equalsForNullValue
- if True, then an '=' is always used, even
for parameters without a value. e.g. "blah?a=&b=&c=".public static String encode(MultiMap map, String charset, boolean equalsForNullValue)
equalsForNullValue
- if True, then an '=' is always used, even
for parameters without a value. e.g. "blah?a=&b=&c=".public static void decodeTo(String content, MultiMap map)
public static void decodeTo(String content, MultiMap map, String charset)
_content
- the string containing the encoded parameterspublic static void decodeTo(byte[] data, int offset, int length, MultiMap map, String charset) throws UnsupportedEncodingException
data
- the byte[] containing the encoded parameters
UnsupportedEncodingException
public static void decodeTo(InputStream in, MultiMap map, String charset) throws IOException
data
- the byte[] containing the encoded parameters
IOException
public static String decodeString(String encoded)
public static String decodeString(String encoded, String charset)
public static String decodeString(String encoded, int offset, int length, String charset)
public static String encodeString(String string)
string
-
public static String encodeString(String string, String charset)
string
-
public Object clone()
clone
in class MultiMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |