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
AssertionError
protected abstract String getEscapeString(char c)
public void filter(String in, Appendable out) throws IOException
filter
in interface TextFilter
IOException
Copyright © 2010–2019 Google. All rights reserved.