jp.sourceforge.livez.lang
クラス JISAutoDetect

java.lang.Object
  上位を拡張 jp.sourceforge.livez.lang.JISAutoDetect

public final class JISAutoDetect
extends Object

このクラスは、JIS (ISO-2022-JP)、シフトJIS (Windows-31J)、EUC-JP の自動判別を行う機能を提供します。

作成者:
杉澤 浩二

メソッドの概要
static String decode(byte[] bytes)
          指定されたバイト列から日本語文字コードを自動判別し Unicode へ変換(デコード)します。
static String decode(String str)
          指定された文字列から日本語文字コードを自動判別し Unicode へ変換(デコード)します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

decode

public static String decode(String str)
指定された文字列から日本語文字コードを自動判別し Unicode へ変換(デコード)します。

パラメータ:
str - 文字列
戻り値:
Unicode へ変換された文字列

decode

public static String decode(byte[] bytes)
                     throws UnsupportedEncodingException
指定されたバイト列から日本語文字コードを自動判別し Unicode へ変換(デコード)します。

パラメータ:
bytes - バイト配列
戻り値:
Unicode へ変換された文字列
例外:
UnsupportedEncodingException


Copyright © 2005-2006 Kouji Sugisawa. All rights reserved.