public class HTMLEntity2JavaReader extends SubstitutionTextReader
SubstitutionTextReader that will substitute plain text values
for html entities encountered in the original text. Line breaks and
whitespace are preserved.| Constructor and Description |
|---|
HTMLEntity2JavaReader(java.io.Reader reader)
Creates a new instance that will read from
reader |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
computeSubstitution(int c)
Implement to compute the substitution for the given character and
if necessary subsequent characters.
|
protected java.lang.String |
entity2Text(java.lang.String symbol)
Replaces an HTML entity body (without & and ;) with its
plain/text (or plain/java) counterpart.
|
close, getReader, getString, isSkippingWhitespace, nextChar, read, read, ready, reset, setSkipWhitespacepublic HTMLEntity2JavaReader(java.io.Reader reader)
readerreader - the source readerprotected java.lang.String computeSubstitution(int c)
throws java.io.IOException
SubstitutionTextReadernextChar
to read subsequent characters.computeSubstitution in class SubstitutionTextReaderjava.io.IOExceptionprotected java.lang.String entity2Text(java.lang.String symbol)
symbol - the entity body to resolvesymbol