|
||||||||||
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 FormNested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Constructor 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,
int offset,
int length,
String charset)
Decode String with % encoding. |
static void |
decodeTo(InputStream in,
MultiMap map,
String charset,
int maxLength)
Decoded parameters to Map. |
static void |
decodeTo(String content,
MultiMap map,
String charset)
Decoded parameters to Map. |
static void |
decodeUtf8To(byte[] raw,
int offset,
int length,
MultiMap map)
Decoded parameters to Map. |
static void |
decodeUtf8To(InputStream in,
MultiMap map,
int maxLength)
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, String charset)
content
- the string containing the encoded parameterspublic static void decodeUtf8To(byte[] raw, int offset, int length, MultiMap map)
data
- the byte[] containing the encoded parameterspublic static void decodeUtf8To(InputStream in, MultiMap map, int maxLength) throws IOException
in
- InputSteam to readmap
- MultiMap to add parameters tomaxLength
- maximum length of conent to read 0r -1 for no limit
IOException
public static void decodeTo(InputStream in, MultiMap map, String charset, int maxLength) throws IOException
in
- the stream containing the encoded parameters
IOException
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 |