public class EntityEncoder extends AbstractCharEncoder
| Modifier and Type | Field and Description |
|---|---|
static EntityEncoder |
BASIC
All HTML entities except the HTML chars which are used to do HTML itself.
|
static EntityEncoder |
FULL
All HTML entities.
|
| Modifier | Constructor and Description |
|---|---|
protected |
EntityEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(char c,
CharWriter writer) |
String |
lookup(char c)
Returns null if no entity is found or return the converted entity.
|
protected void |
put(int c,
String entity) |
protected void |
remove(int c) |
int |
reverse(String s)
Returns the char related to the provided string.
|
void |
safeEncode(char[] chars,
int off,
int len,
CharWriter writer) |
encode, encode, encode, encodepublic static final EntityEncoder FULL
public static final EntityEncoder BASIC
public void encode(char c,
CharWriter writer)
throws EncodingException
encode in interface CharEncoderencode in class AbstractCharEncoderc - the char to encodewriter - the writer to useEncodingException - an encoding exceptionpublic void safeEncode(char[] chars,
int off,
int len,
CharWriter writer)
throws EncodingException
safeEncode in class AbstractCharEncoderEncodingExceptionprotected final void put(int c,
String entity)
protected final void remove(int c)
public final String lookup(char c)
c - the char to encodepublic final int reverse(String s)
s - the string to be reversed into the characterCopyright © 2025 JBoss by Red Hat. All Rights Reserved.