|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.novell.sentinel.uri.PercentCodex
public class PercentCodex
Class for encoding and decoding URI components.
| Field Summary | |
|---|---|
static String |
BASE_RESERVED_CHARS
The set of general delims (gen-delims) in RFC 3986. |
| Constructor Summary | |
|---|---|
PercentCodex()
Construct a default codex that will encode spaces and the "gen-delims" from RFC 3986 |
|
PercentCodex(String additionalReservedChars)
Construct a codex that will encode spaces, the "gen-delims" from RFC 3986, plus any additional characters passed. |
|
PercentCodex(String additionalReservedChars,
String removedReservedChars)
Construct a codex that will encode spaces, the "gen-delims" from RFC 3986, plus any additional characters passed, minus any specified characters. |
|
| Method Summary | |
|---|---|
protected static String |
_decode(CharSequence string,
boolean strict)
Decode the passed character sequence. |
static String |
decode(CharSequence string)
Decode the passed percent-encoded string. |
static String |
decodeStrict(CharSequence string)
Decode the passed percent-encoded string, throwing an exception if an illegal percent-encoded sequence is found. |
String |
encode(CharSequence string)
Encode spaces and any "reserved" characters set in this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BASE_RESERVED_CHARS
| Constructor Detail |
|---|
public PercentCodex()
public PercentCodex(String additionalReservedChars)
additionalReservedChars - Additional characters that must be percent-encoded.
public PercentCodex(String additionalReservedChars,
String removedReservedChars)
additionalReservedChars - Additional characters that must be percent-encoded.removedReservedChars - Characters to remove from the "gen-delims" set.| Method Detail |
|---|
public String encode(CharSequence string)
string - The characters to encode.
public static String decodeStrict(CharSequence string)
throws ParseException
string - The characters to decode.
ParseException - if an illegal sequence is found.public static String decode(CharSequence string)
string - The characters to decode.
protected static String _decode(CharSequence string,
boolean strict)
throws ParseException
string - The characters to decode.strict - If true, throw an exception if an illegal percent-encoded sequence is found, otherwise, just return the illegal
sequence as-is.
ParseException - If strict is true, and an illegal sequence is found.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||