|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.protocol.http.WicketURLEncoder
public class WicketURLEncoder
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
,
"http://www.ietf.org/rfc/rfc2396.txt"}
Nested Class Summary | |
---|---|
static class |
WicketURLEncoder.Type
encoder types |
Field Summary | |
---|---|
protected static int |
caseDiff
|
protected java.util.BitSet |
dontNeedEncoding
|
static WicketURLEncoder |
FULL_PATH_INSTANCE
Encoder used to encode all path segments. |
static WicketURLEncoder |
PATH_INSTANCE
Encoder used to encode components of a path. For example: http://org.acme/foo/thispart/orthispart?butnot=thispart |
static WicketURLEncoder |
QUERY_INSTANCE
Encoder used to encode name or value components of a query string. For example: http://org.acme/notthis/northis/oreventhis?buthis=isokay&asis=thispart |
Constructor Summary | |
---|---|
protected |
WicketURLEncoder(WicketURLEncoder.Type type,
char stopChar)
Allow subclass to call constructor. |
Method Summary | |
---|---|
java.lang.String |
encode(java.lang.String s)
Calls encode with the application response request encoding as returned by Application.get().getRequestCycleSettings().getResponseRequestEncoding() |
java.lang.String |
encode(java.lang.String s,
java.lang.String enc)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.BitSet dontNeedEncoding
protected static final int caseDiff
public static final WicketURLEncoder QUERY_INSTANCE
public static final WicketURLEncoder PATH_INSTANCE
public static final WicketURLEncoder FULL_PATH_INSTANCE
Constructor Detail |
---|
protected WicketURLEncoder(WicketURLEncoder.Type type, char stopChar)
type
- encoder typestopChar
- stop encoding when stopChar foundMethod Detail |
---|
public java.lang.String encode(java.lang.String s)
s
- Value to encode
public java.lang.String encode(java.lang.String s, java.lang.String enc)
s
- string to encodeenc
- encoding to use
URLEncoder.encode(String, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |