public abstract class SimpleEscapingFunction extends Object implements TextFilter
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleEscapingFunction() |
protected |
SimpleEscapingFunction(char[] ESCAPE_CHARS)
Creates an instance to escape the given set of characters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
filter(String in,
Appendable out)
Algorithm is as follows:
Scan block for contiguous unescaped sequences
Append unescaped sequences to output
Append escaped string to output (if found)
Rinse & Repeat
|
protected abstract String |
getEscapeString(char c)
Given one of the escape characters supplied to this instance's constructor, return the escape
string for it.
|
protected void |
setEscapeChars(char[] ESCAPE_CHARS) |
protected SimpleEscapingFunction(char[] ESCAPE_CHARS)
protected SimpleEscapingFunction()
protected void setEscapeChars(char[] ESCAPE_CHARS)
throws AssertionError
AssertionErrorprotected abstract String getEscapeString(char c)
public void filter(String in, Appendable out) throws IOException
filter in interface TextFilterIOExceptionCopyright © 2010–2016 Google. All rights reserved.