|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectcom.ozacc.mail.fetch.impl.sk_jp.io.UnicodeCorrector
public abstract class UnicodeCorrector
UnicodeCorrector.
CorrectOutputStreamWriterで用いられる文字列バッファ補正クラスです。
出力エンコーディングによって補正すべき文字コードが異なるので、
実際の補正処理はサブクラスで行います。
対応しているのは以下のコンバータ名です。
| コンストラクタの概要 | |
|---|---|
UnicodeCorrector()
|
|
| メソッドの概要 | |
|---|---|
static void |
addCorrector(String enc,
Class correctorClass)
新しいUnicodeCorrectorを追加します。 |
abstract char |
correct(char c)
|
char[] |
correct(char[] cbuf,
int off,
int len)
Unicode文字配列の補正を行います。 |
String |
correct(String s)
|
static UnicodeCorrector |
getInstance(String enc)
Create an UnicodeCorrector that uses the named character encoding. |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public UnicodeCorrector()
| メソッドの詳細 |
|---|
public static UnicodeCorrector getInstance(String enc)
throws UnsupportedEncodingException
enc - Name of the encoding to be used
UnsupportedEncodingException - If the named encoding is not supported
public char[] correct(char[] cbuf,
int off,
int len)
特定の文字を特定エンコーディングで出力しようとした際の sun.ioコンバータでは正常に変換できない部分を補正します。
cbuf - Buffer of charactersoff - Offset from which to start writing characterslen - Number of characters to write
cbuf
in case of different result size.public String correct(String s)
public abstract char correct(char c)
public static void addCorrector(String enc,
Class correctorClass)
このソースコードを変えずに、動的に新たな出力エンコーディングに 対応したUnicodeCorrectorを登録したい場合に用います。
enc - 対応するエンコーディング名correctorClass - UnicodeCorrectorサブクラスのClassオブジェクト
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||