public class PercentCodec extends Codec
Encoder| Constructor and Description |
|---|
PercentCodec() |
| Modifier and Type | Method and Description |
|---|---|
Character |
decodeCharacter(PushbackString input)
Returns the decoded version of the next character from the input string and advances the
current character in the PushbackString.
|
String |
encodeCharacter(char[] immune,
Character c)
Encode a character for URLs
|
containsCharacter, decode, encode, getHexForNonAlphanumeric, toHex, toOctalpublic String encodeCharacter(char[] immune, Character c)
encodeCharacter in class Codecimmune - Additional characters not to encode. Note this could
break URL encoding as referenced in RFC 3986. You should
especially be wary of including '%' in this list of immune
characters since it is used as the "escape" character for
the hex encoding and including it may result in subsequent
and/or dangerous results when decoding.c - character to encodepublic Character decodeCharacter(PushbackString input)
decodeCharacter in class Codecinput - encoded character using percent characters (such as URL encoding)Copyright © 2016 The Open Web Application Security Project (OWASP). All rights reserved.