@Immutable public class UrlEncoder extends Object implements TextEncoder, TextDecoder
URLEncoder and URLDecoder should be used for such purposes).| Modifier and Type | Field and Description |
|---|---|
static char |
ESCAPE_CHARACTER |
| Constructor and Description |
|---|
UrlEncoder() |
| Modifier and Type | Method and Description |
|---|---|
String |
decode(String encodedText)
Return the decoded version of an encoded string
|
String |
encode(String text)
Returns the encoded version of a string.
|
protected String |
encode(String text,
BitSet safeChars) |
boolean |
isSlashEncoded() |
UrlEncoder |
setSlashEncoded(boolean slashEncoded) |
public static final char ESCAPE_CHARACTER
public String encode(String text)
encode in interface TextEncodertext - the text with characters that are to be encoded.TextDecoder.decode(String)public String decode(String encodedText)
decode in interface TextDecoderencodedText - the encoded textTextEncoder.encode(String)public boolean isSlashEncoded()
public UrlEncoder setSlashEncoded(boolean slashEncoded)
slashEncoded - Sets slashEncoded to the specified value.Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.