com.ozacc.mail.fetch.impl.sk_jp.text
クラス EntityRefEncoder

java.lang.Object
  上位を拡張 com.ozacc.mail.fetch.impl.sk_jp.text.EntityRefEncoder
すべての実装されたインタフェース:
Translator

public class EntityRefEncoder
extends Object
implements Translator

<>&"を&lt;&gt;&amp;&quot;に 変換するTranslatorです。 リエントラントなので、通常はINSTANCE/CANONICAL_INSTANCEを用いればよいです。 またStringオブジェクトに対してはencode()メソッドが使用できます。

バージョン:
$Revision: 1.1.2.1 $ $Date: 2005/01/18 07:20:43 $
作成者:
Shin

フィールドの概要
static EntityRefEncoder CANONICAL_INSTANCE
           
static EntityRefEncoder INSTANCE
           
 
コンストラクタの概要
EntityRefEncoder()
           
EntityRefEncoder(boolean canonical)
           
 
メソッドの概要
static String decode(String s)
          実体参照変換されている文字列をもとに戻します。
static String encode(String s)
          文字列の実体参照化を行います。
static void translate(char c, Writer w, boolean canonical)
          特定の文字を実体参照に変換して書き出します。
 void translate(Reader r, Writer w)
          文字ストリームから入力した文字列を任意の変換を 行いながら出力ストリームに書き出します。
 String translate(String source)
          入力文字列に任意の変換を施した文字列を返します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

CANONICAL_INSTANCE

public static final EntityRefEncoder CANONICAL_INSTANCE

INSTANCE

public static final EntityRefEncoder INSTANCE
コンストラクタの詳細

EntityRefEncoder

public EntityRefEncoder()

EntityRefEncoder

public EntityRefEncoder(boolean canonical)
メソッドの詳細

translate

public void translate(Reader r,
                      Writer w)
               throws IOException
文字ストリームから入力した文字列を任意の変換を 行いながら出力ストリームに書き出します。

定義:
インタフェース Translator 内の translate
例外:
IOException

translate

public String translate(String source)
インタフェース Translator の記述:
入力文字列に任意の変換を施した文字列を返します。

定義:
インタフェース Translator 内の translate

encode

public static String encode(String s)
文字列の実体参照化を行います。

パラメータ:
s - 対象文字列
戻り値:
変換後文字列

translate

public static void translate(char c,
                             Writer w,
                             boolean canonical)
                      throws IOException
特定の文字を実体参照に変換して書き出します。

例外:
IOException

decode

public static String decode(String s)
実体参照変換されている文字列をもとに戻します。

パラメータ:
s - 対象文字列
戻り値:
変換後文字列


Copyright © 2004-2006 OZACC. All Rights Reserved.