|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.request.UrlEncoder
public class UrlEncoder
Adapted from java.net.URLEncoder, but defines instances for query string encoding versus URL path component encoding.
The difference is important because a space is encoded as a + in a query string, but this is a valid value in a path component (and is therefore not decode back to a space).
URLEncoder,
RFC-2396| Nested Class Summary | |
|---|---|
static class |
UrlEncoder.Type
encoder types |
| Field Summary | |
|---|---|
protected static int |
caseDiff
|
protected BitSet |
dontNeedEncoding
|
static UrlEncoder |
FULL_PATH_INSTANCE
Encoder used to encode all path segments. |
static UrlEncoder |
PATH_INSTANCE
Encoder used to encode components of a path. |
static UrlEncoder |
QUERY_INSTANCE
Encoder used to encode name or value components of a query string. |
| Constructor Summary | |
|---|---|
protected |
UrlEncoder(UrlEncoder.Type type)
Allow subclass to call constructor. |
| Method Summary | |
|---|---|
String |
encode(String s,
Charset charset)
|
String |
encode(String unsafeInput,
String charsetName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BitSet dontNeedEncoding
protected static final int caseDiff
public static final UrlEncoder QUERY_INSTANCE
public static final UrlEncoder PATH_INSTANCE
public static final UrlEncoder FULL_PATH_INSTANCE
| Constructor Detail |
|---|
protected UrlEncoder(UrlEncoder.Type type)
type - encoder type| Method Detail |
|---|
public String encode(String s,
Charset charset)
s - string to encodecharset - charset to use for encoding
URLEncoder.encode(String, String)
public String encode(String unsafeInput,
String charsetName)
s - string to encodecharsetName - encoding to use
URLEncoder.encode(String, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||