jp.sourceforge.livez.mail.util
クラス EZwebJIS

java.lang.Object
  上位を拡張 jp.sourceforge.livez.mail.util.EZwebJIS

public final class EZwebJIS
extends Object

EZweb 絵文字用の JIS (ISO-2022-JP) と Unicode の相互変換機能を提供するクラスです。

基本的には WindowsJIS と同じですが、358 番以降の絵文字について適切に処理します。

作成者:
杉澤 浩二

メソッドの概要
static String correct(String text)
          Windows 用ユニコードマッピングされている文字列を EZweb 仕様のユニコードへマッピングされる様に補正します。
static String decode(byte[] input)
          JIS (ISO-2022-JP) から Unicode へ変換(デコード)します。
static String decode(byte[] input, int length)
          JIS (ISO-2022-JP) から Unicode へ変換(デコード)します。
static byte[] encode(String input)
          Unicode から JIS (ISO-2022-JP) へ変換(エンコード)します。
static String incorrect(String text)
          EZweb 仕様のユニコードマッピングされている文字列を Windows 用ユニコードマッピングされる様にします。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

encode

public static byte[] encode(String input)
Unicode から JIS (ISO-2022-JP) へ変換(エンコード)します。

パラメータ:
input - 変換する文字列
戻り値:
JIS コードで表されたバイト配列

decode

public static String decode(byte[] input)
JIS (ISO-2022-JP) から Unicode へ変換(デコード)します。

パラメータ:
input - JIS コードで表されたバイト配列
戻り値:
Unicode へ変換された文字列

decode

public static String decode(byte[] input,
                            int length)
JIS (ISO-2022-JP) から Unicode へ変換(デコード)します。

パラメータ:
input - JIS コードで表されたバイト配列
length - input の処理する桁数
戻り値:
Unicode へ変換された文字列

correct

public static String correct(String text)
Windows 用ユニコードマッピングされている文字列を EZweb 仕様のユニコードへマッピングされる様に補正します。

このメソッドは指定された文字列中に 358 番以降の絵文字が含まれている場合に、 EZweb 仕様と一致するユニコードで文字列操作する場合に使用します。

パラメータ:
text - 補正する文字列
戻り値:
補正された文字列

incorrect

public static String incorrect(String text)
EZweb 仕様のユニコードマッピングされている文字列を Windows 用ユニコードマッピングされる様にします。

パラメータ:
text - 文字列
戻り値:
文字列