com.caucho.quercus.lib.i18n
Class Decoder

java.lang.Object
  extended by com.caucho.quercus.lib.i18n.Decoder
Direct Known Subclasses:
GenericDecoder, Utf8Decoder

public abstract class Decoder
extends java.lang.Object


Field Summary
protected  java.lang.String _charset
           
protected  boolean _hasError
           
protected  boolean _isAllowMalformedOut
           
protected  boolean _isIgnoreErrors
           
protected  boolean _isReplaceUnicode
           
protected  java.lang.CharSequence _replacement
           
 
Constructor Summary
protected Decoder(java.lang.String charset)
           
 
Method Summary
static Decoder create(java.lang.String charset)
           
 java.lang.CharSequence decode(Env env, StringValue str)
           
protected abstract  java.lang.StringBuilder decodeImpl(Env env, StringValue str)
           
 java.lang.StringBuilder decodeStringBuilder(Env env, StringValue str)
           
 StringValue decodeUnicode(Env env, StringValue str)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_charset

protected java.lang.String _charset

_replacement

protected java.lang.CharSequence _replacement

_isIgnoreErrors

protected boolean _isIgnoreErrors

_isReplaceUnicode

protected boolean _isReplaceUnicode

_isAllowMalformedOut

protected boolean _isAllowMalformedOut

_hasError

protected boolean _hasError
Constructor Detail

Decoder

protected Decoder(java.lang.String charset)
Method Detail

create

public static Decoder create(java.lang.String charset)

isUtf8

public boolean isUtf8()

isIgnoreErrors

public final boolean isIgnoreErrors()

setIgnoreErrors

public final void setIgnoreErrors(boolean isIgnore)

hasError

public final boolean hasError()

setReplacement

public final void setReplacement(java.lang.CharSequence replacement)

setReplaceUnicode

public final void setReplaceUnicode(boolean isReplaceUnicode)

setAllowMalformedOut

public final void setAllowMalformedOut(boolean isAllowMalformedOut)

reset

public void reset()

decode

public final java.lang.CharSequence decode(Env env,
                                           StringValue str)

decodeStringBuilder

public java.lang.StringBuilder decodeStringBuilder(Env env,
                                                   StringValue str)

decodeUnicode

public StringValue decodeUnicode(Env env,
                                 StringValue str)

isDecodable

public abstract boolean isDecodable(Env env,
                                    StringValue str)

decodeImpl

protected abstract java.lang.StringBuilder decodeImpl(Env env,
                                                      StringValue str)