public abstract class AbstractCharReplacementEncoder extends java.lang.Object
Abstract base class for implementing encoders that do character replacements Implements the StreamingEncoder interface that enables efficient streaming encoding
Modifiers | Name | Description |
---|---|---|
protected CodecIdentifier |
codecIdentifier |
Constructor and description |
---|
AbstractCharReplacementEncoder
(CodecIdentifier codecIdentifier) |
Type | Name and description |
---|---|
protected java.lang.String |
convertToString(java.lang.Object o) |
EncodesToWriter |
createChainingEncodesToWriter(java.util.List<StreamingEncoder> encoders, boolean applyAdditionalFirst) |
protected java.lang.Object |
doCharReplacementEncoding(java.lang.Object o) |
java.lang.Object |
encode(java.lang.Object o) |
void |
encodeToStream(Encoder thisInstance, java.lang.CharSequence str, int off, int len, EncodedAppender appender, EncodingState encodingState) |
void |
encodeToWriter(java.lang.CharSequence str, int off, int len, java.io.Writer writer, EncodingState encodingState) |
void |
encodeToWriter(char[] buf, int off, int len, java.io.Writer writer, EncodingState encodingState) |
protected java.lang.Object |
escapeCharSequence(java.lang.CharSequence str) |
protected java.lang.String |
escapeCharacter(char ch, char previousChar) Escape the character, return null if no replacement has to be made |
CodecIdentifier |
getCodecIdentifier() |
boolean |
isApplyToSafelyEncoded() |
boolean |
isSafe() |
void |
markEncoded(java.lang.CharSequence string) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Escape the character, return null if no replacement has to be made
ch
- the character to escapepreviousChar
- the previous char