|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.builtins.string.PercentEncoder
public class PercentEncoder
A helper class for percent-encoding. Only those characters are encoded, that are not in the set of unreserved characters. Per default the set of unreserved characters consists of the characters defined in RFC 3986 section 2.3.
| Constructor Summary | |
|---|---|
PercentEncoder()
Creates a new instance of PercentEncoder. |
|
| Method Summary | |
|---|---|
String |
encode(String string)
Percent-encodes the given string according to the sets of reserved and unreserved characters. |
void |
reserve(char character)
Puts the given character in the set of reserved characters. |
void |
reserve(char[] characters)
Puts all character in the given array of characters in the set of reserved characters. |
void |
reserve(int codePoint)
Puts the given code point in the set of reserved characters. |
void |
reserveAll()
Puts all characters in the set of reserved character. |
void |
unreserve(char character)
Puts the given character in the set of unreserved characters. |
void |
unreserve(char[] characters)
Puts all character in the given array of characters in the set of unreserved characters. |
void |
unreserve(int codePoint)
Puts the given code point in the set of unreserved characters. |
void |
unreserveAll()
Puts all characters in the set of unreserved character. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PercentEncoder()
| Method Detail |
|---|
public void reserve(int codePoint)
codePoint - The code point to be put in the set of reserved
characters.public void reserve(char character)
character - The character to be put in the set of reserved
characters.public void reserve(char[] characters)
characters - The array of characters to be put in the set of
reserved characters.public void reserveAll()
public void unreserve(int codePoint)
codePoint - The code point to be put in the set of unreserved
characters.public void unreserve(char character)
codePoint - The character to be put in the set of unreserved
characters.public void unreserve(char[] characters)
characters - The array of characters to be put in the set of
unreserved characters.public void unreserveAll()
public String encode(String string)
string - The String to be percent-encoded.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||