|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tuckey.web.filters.urlrewrite.utils.URLEncoder
public class URLEncoder
URL-encoding utility for each URL part according to the RFC specs see the rfc at http://www.ietf.org/rfc/rfc2396.txt
| Field Summary | |
|---|---|
static BitSet |
ALPHA
alpha = lowalpha | upalpha |
static BitSet |
ALPHANUM
alphanum = alpha | digit |
static BitSet |
DIGIT
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" |
static BitSet |
LOW_ALPHA
lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" |
static BitSet |
MARK
mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" |
static BitSet |
PCHAR
pchar = unreserved | escaped | ":" | "@" | "&" | "=" | "+" | "$" | "," Note: we don't allow escaped here since we will escape it ourselves, so we don't want to allow them in the unescaped sequences |
static BitSet |
UNRESERVED
unreserved = alphanum | mark |
static BitSet |
UP_ALPHA
upalpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" |
| Constructor Summary | |
|---|---|
URLEncoder()
|
|
| Method Summary | |
|---|---|
static String |
encodePathParam(String pathParam,
String charset)
Encodes a string to be a valid path parameter URL, which means it can contain PCHAR* only (do not put the leading ";" or it will be escaped. |
static String |
encodePathSegment(String pathSegment,
String charset)
Encodes a string to be a valid path segment URL, which means it can contain PCHAR* only (do not put path parameters or they will be escaped. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final BitSet MARK
public static final BitSet LOW_ALPHA
public static final BitSet UP_ALPHA
public static final BitSet ALPHA
public static final BitSet DIGIT
public static final BitSet ALPHANUM
public static final BitSet UNRESERVED
public static final BitSet PCHAR
| Constructor Detail |
|---|
public URLEncoder()
| Method Detail |
|---|
public static String encodePathParam(String pathParam,
String charset)
throws UnsupportedEncodingException
UnsupportedEncodingException
public static String encodePathSegment(String pathSegment,
String charset)
throws UnsupportedEncodingException
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||