|
|||||||||
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
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 |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary | |
---|---|
UrlEncoded()
|
|
UrlEncoded(java.lang.String s)
|
|
UrlEncoded(java.lang.String s,
java.lang.String charset)
|
|
UrlEncoded(UrlEncoded url)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
void |
decode(java.lang.String query)
|
void |
decode(java.lang.String query,
java.lang.String charset)
|
static void |
decode88591To(java.io.InputStream in,
MultiMap map,
int maxLength,
int maxKeys)
Decoded parameters to Map. |
static java.lang.String |
decodeString(java.lang.String encoded,
int offset,
int length,
java.lang.String charset)
Decode String with % encoding. |
static void |
decodeTo(java.io.InputStream in,
MultiMap map,
java.lang.String charset,
int maxLength,
int maxKeys)
Decoded parameters to Map. |
static void |
decodeTo(java.lang.String content,
MultiMap map,
java.lang.String charset)
Decoded parameters to Map. |
static void |
decodeTo(java.lang.String content,
MultiMap map,
java.lang.String charset,
int maxKeys)
Decoded parameters to Map. |
static void |
decodeUtf16To(java.io.InputStream in,
MultiMap map,
int maxLength,
int maxKeys)
|
static void |
decodeUtf8To(byte[] raw,
int offset,
int length,
MultiMap map)
Decoded parameters to Map. |
static void |
decodeUtf8To(byte[] raw,
int offset,
int length,
MultiMap map,
Utf8StringBuffer buffer)
Decoded parameters to Map. |
static void |
decodeUtf8To(java.io.InputStream in,
MultiMap map,
int maxLength,
int maxKeys)
Decoded parameters to Map. |
java.lang.String |
encode()
Encode Hashtable with % encoding. |
static java.lang.String |
encode(MultiMap map,
java.lang.String charset,
boolean equalsForNullValue)
Encode Hashtable with % encoding. |
java.lang.String |
encode(java.lang.String charset)
Encode Hashtable with % encoding. |
java.lang.String |
encode(java.lang.String charset,
boolean equalsForNullValue)
Encode Hashtable with % encoding. |
static java.lang.String |
encodeString(java.lang.String string)
Perform URL encoding. |
static java.lang.String |
encodeString(java.lang.String string,
java.lang.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(java.lang.String s)
public UrlEncoded(java.lang.String s, java.lang.String charset)
Method Detail |
---|
public void decode(java.lang.String query)
public void decode(java.lang.String query, java.lang.String charset)
public java.lang.String encode()
public java.lang.String encode(java.lang.String charset)
public java.lang.String encode(java.lang.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 java.lang.String encode(MultiMap map, java.lang.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(java.lang.String content, MultiMap map, java.lang.String charset)
content
- the string containing the encoded parameterspublic static void decodeTo(java.lang.String content, MultiMap map, java.lang.String charset, int maxKeys)
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(byte[] raw, int offset, int length, MultiMap map, Utf8StringBuffer buffer)
data
- the byte[] containing the encoded parameterspublic static void decode88591To(java.io.InputStream in, MultiMap map, int maxLength, int maxKeys) throws java.io.IOException
in
- InputSteam to readmap
- MultiMap to add parameters tomaxLength
- maximum length of content to read or -1 for no limitmaxKeys
- maximum number of keys to read or -1 for no limit
java.io.IOException
public static void decodeUtf8To(java.io.InputStream in, MultiMap map, int maxLength, int maxKeys) throws java.io.IOException
in
- InputSteam to readmap
- MultiMap to add parameters tomaxLength
- maximum length of content to read or -1 for no limitmaxKeys
- maximum number of keys to read or -1 for no limit
java.io.IOException
public static void decodeUtf16To(java.io.InputStream in, MultiMap map, int maxLength, int maxKeys) throws java.io.IOException
java.io.IOException
public static void decodeTo(java.io.InputStream in, MultiMap map, java.lang.String charset, int maxLength, int maxKeys) throws java.io.IOException
in
- the stream containing the encoded parameters
java.io.IOException
public static java.lang.String decodeString(java.lang.String encoded, int offset, int length, java.lang.String charset)
public static java.lang.String encodeString(java.lang.String string)
string
-
public static java.lang.String encodeString(java.lang.String string, java.lang.String charset)
string
-
public java.lang.Object clone()
clone
in class MultiMap
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |