public abstract class Decoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_charset |
protected boolean |
_hasError |
protected boolean |
_isAllowMalformedOut |
protected boolean |
_isIgnoreErrors |
protected boolean |
_isReplaceUnicode |
protected java.lang.CharSequence |
_replacement |
Modifier | Constructor and Description |
---|---|
protected |
Decoder(java.lang.String charset) |
Modifier and Type | Method and Description |
---|---|
static Decoder |
create(java.lang.String charset) |
java.lang.CharSequence |
decode(Env env,
StringValue str) |
StringValue |
decodeUnicode(StringValue str) |
abstract void |
decodeUnicode(StringValue str,
UnicodeBuilderValue sb) |
boolean |
hasError() |
abstract boolean |
isDecodable(Env env,
StringValue str) |
boolean |
isIgnoreErrors() |
boolean |
isUtf8() |
void |
reset() |
void |
setAllowMalformedOut(boolean isAllowMalformedOut) |
void |
setIgnoreErrors(boolean isIgnore) |
void |
setReplacement(java.lang.CharSequence replacement) |
void |
setReplaceUnicode(boolean isReplaceUnicode) |
protected java.lang.String _charset
protected java.lang.CharSequence _replacement
protected boolean _isIgnoreErrors
protected boolean _isReplaceUnicode
protected boolean _isAllowMalformedOut
protected boolean _hasError
public static Decoder create(java.lang.String charset)
public boolean isUtf8()
public final boolean isIgnoreErrors()
public final void setIgnoreErrors(boolean isIgnore)
public final boolean hasError()
public final void setReplacement(java.lang.CharSequence replacement)
public final void setReplaceUnicode(boolean isReplaceUnicode)
public final void setAllowMalformedOut(boolean isAllowMalformedOut)
public void reset()
public final java.lang.CharSequence decode(Env env, StringValue str)
public final StringValue decodeUnicode(StringValue str)
public abstract void decodeUnicode(StringValue str, UnicodeBuilderValue sb)
public abstract boolean isDecodable(Env env, StringValue str)