com.caucho.quercus.lib.i18n
Class Encoder

java.lang.Object
  extended by com.caucho.quercus.lib.i18n.Encoder
Direct Known Subclasses:
GenericEncoder, Utf8Encoder

public abstract class Encoder
extends java.lang.Object


Field Summary
protected  java.lang.String _charset
           
protected  boolean _isIgnore
           
protected  boolean _isReplaceUnicode
           
protected  java.lang.String _replacement
           
protected static int ERROR_CHARACTER
           
 
Constructor Summary
protected Encoder(java.lang.String charset)
           
 
Method Summary
static Encoder create(java.lang.String charset)
           
abstract  StringValue encode(Env env, java.lang.CharSequence str)
           
 StringValue encode(Env env, java.lang.CharSequence str, boolean isReset)
           
abstract  boolean isEncodable(Env env, StringValue str)
           
 boolean isIgnore()
           
 boolean isUtf8()
           
 void reset()
           
 void setIgnoreErrors(boolean isIgnore)
           
 void setReplacement(java.lang.String 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

ERROR_CHARACTER

protected static final int ERROR_CHARACTER
See Also:
Constant Field Values

_charset

protected java.lang.String _charset

_replacement

protected java.lang.String _replacement

_isIgnore

protected boolean _isIgnore

_isReplaceUnicode

protected boolean _isReplaceUnicode
Constructor Detail

Encoder

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

create

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

isUtf8

public boolean isUtf8()

isIgnore

public boolean isIgnore()

setIgnoreErrors

public void setIgnoreErrors(boolean isIgnore)

setReplacement

public void setReplacement(java.lang.String replacement)

setReplaceUnicode

public final void setReplaceUnicode(boolean isReplaceUnicode)

reset

public void reset()

isEncodable

public abstract boolean isEncodable(Env env,
                                    StringValue str)

encode

public abstract StringValue encode(Env env,
                                   java.lang.CharSequence str)

encode

public final StringValue encode(Env env,
                                java.lang.CharSequence str,
                                boolean isReset)