|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.owasp.esapi.codecs.Codec org.owasp.esapi.codecs.XMLEntityCodec
public class XMLEntityCodec
Implementation of the Codec interface for XML entity encoding. This differes from HTML entity encoding in that only the following named entities are predefined:
Constructor Summary | |
---|---|
XMLEntityCodec()
|
Method Summary | |
---|---|
java.lang.Character |
decodeCharacter(PushbackString input)
Returns the decoded version of the next character from the input string and advances the current character in the PushbackString. Returns the decoded version of the character starting at index, or null if no decoding is possible. |
java.lang.String |
encodeCharacter(char[] immune,
java.lang.Character c)
Default implementation that should be overridden in specific codecs. Encodes a Character using XML entities as necessary. |
Methods inherited from class org.owasp.esapi.codecs.Codec |
---|
containsCharacter, decode, encode, getHexForNonAlphanumeric, toHex, toOctal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLEntityCodec()
Method Detail |
---|
public java.lang.String encodeCharacter(char[] immune, java.lang.Character c)
encodeCharacter
in class Codec
immune
- characters that should not be encoded as entitiesc
- the Character to encode
public java.lang.Character decodeCharacter(PushbackString input)
decodeCharacter
in class Codec
input
- the Character to decode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |