public interface Codec<T>
Encoder
Modifier and Type | Method and Description |
---|---|
boolean |
containsCharacter(char c,
char[] array)
Utility to search a char[] for a specific char.
|
String |
decode(String input)
Decode a String that was encoded using the encode method in this Class
|
T |
decodeCharacter(PushbackSequence<T> input)
Returns the decoded version of the next character from the input string and advances the
current character in the PushbackSequence.
|
String |
encode(char[] immune,
String input)
Encode a String so that it can be safely used in a specific context.
|
String |
encodeCharacter(char[] immune,
Character c)
Default implementation that should be overridden in specific codecs.
|
String |
encodeCharacter(char[] immune,
int codePoint)
Default codepoint implementation that should be overridden in specific codecs.
|
String |
getHexForNonAlphanumeric(char c)
Lookup the hex value of any character that is not alphanumeric.
|
String |
getHexForNonAlphanumeric(int c)
Lookup the hex value of any character that is not alphanumeric.
|
String |
toHex(char c) |
String |
toHex(int c) |
String |
toOctal(char c) |
String encode(char[] immune, String input)
immune
- input
- the String to encodeString encodeCharacter(char[] immune, Character c)
immune
- array of chars to NOT encode. Use with caution.c
- the Character to encodeString encodeCharacter(char[] immune, int codePoint)
immune
- codePoint
- the integer to encodeString decode(String input)
input
- the String to decodeT decodeCharacter(PushbackSequence<T> input)
input
- the Character to decodeString getHexForNonAlphanumeric(char c)
c
- The character to lookup.String getHexForNonAlphanumeric(int c)
c
- The character to lookup.String toOctal(char c)
String toHex(char c)
String toHex(int c)
boolean containsCharacter(char c, char[] array)
c
- array
- Copyright © 2020 The Open Web Application Security Project (OWASP). All rights reserved.