public abstract class Encoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_charset |
protected boolean |
_isIgnore |
protected boolean |
_isReplaceUnicode |
protected java.lang.String |
_replacement |
protected static int |
ERROR_CHARACTER |
Modifier | Constructor and Description |
---|---|
protected |
Encoder(java.lang.String charset) |
Modifier and Type | Method and Description |
---|---|
static Encoder |
create(java.lang.String charset) |
StringValue |
encode(StringValue sb,
java.lang.CharSequence str) |
StringValue |
encode(StringValue sb,
java.lang.CharSequence str,
boolean isReset) |
abstract StringValue |
encode(StringValue sb,
java.lang.CharSequence str,
int start,
int end) |
StringValue |
encode(StringValue sb,
java.lang.CharSequence str,
int start,
int end,
boolean isReset) |
abstract boolean |
isEncodable(StringValue str,
int start,
int end) |
boolean |
isIgnore() |
boolean |
isUtf8() |
void |
reset() |
void |
setIgnoreErrors(boolean isIgnore) |
void |
setReplacement(java.lang.String replacement) |
void |
setReplaceUnicode(boolean isReplaceUnicode) |
protected static final int ERROR_CHARACTER
protected java.lang.String _charset
protected java.lang.String _replacement
protected boolean _isIgnore
protected boolean _isReplaceUnicode
public static Encoder create(java.lang.String charset)
public boolean isUtf8()
public boolean isIgnore()
public void setIgnoreErrors(boolean isIgnore)
public void setReplacement(java.lang.String replacement)
public final void setReplaceUnicode(boolean isReplaceUnicode)
public void reset()
public abstract boolean isEncodable(StringValue str, int start, int end)
public StringValue encode(StringValue sb, java.lang.CharSequence str)
public StringValue encode(StringValue sb, java.lang.CharSequence str, boolean isReset)
public abstract StringValue encode(StringValue sb, java.lang.CharSequence str, int start, int end)
public final StringValue encode(StringValue sb, java.lang.CharSequence str, int start, int end, boolean isReset)