intra-mart 6.1.14

jp.co.intra_mart.foundation.utility.charset
クラス AdvancedOutputStreamWriter

java.lang.Object
  拡張java.io.Writer
      拡張java.io.FilterWriter
          拡張jp.co.intra_mart.foundation.utility.charset.AdvancedOutputStreamWriter

推奨されていません。 jp.co.intra_mart.common.aid.jdk.util.charset.AdvancedOutputStreamWriter クラスを使用してください。

public class AdvancedOutputStreamWriter
extends FilterWriter

このクラスは、基礎となる java.io.OutputStreamWriter をフィルタリングした Writer 機能を提供します。

通常、ASCII の範囲に含まれない文字は、java.io.OutputStreamWriter を 利用して相互に文字コード変換した場合、各文字エンコーディングの Unicode に対するマッピングの相違により、本来その文字エンコーディングにおいて 存在する文字であってもコード不明を意味する「?」に置き換えられてしまう ことがあります。 いわゆる、この文字化けに対して、文字コード変換前に、 対象となる文字エンコーディングに対する Unicode の正しい文字に 置換することで、いくつかの文字については正しく文字コード変換することが できます。
このクラスでは、この方式により文字化けを回避します。

文字化けに対する文字のマッピングおよび対応する文字エンコーディングに 関しては、CharacterEncoder クラスの仕様に準じます。

導入されたバージョン:
version4.3
関連項目:
jp.co.intra_mart.common.aid.jdk.util.charset.AdvancedOutputStreamWriter, jp.co.intra_mart.common.aid.jdk.util.charset.ResourceNotFoundException, jp.co.intra_mart.common.aid.jdk.util.charset.ResourceFormatException, CharacterEncoder

フィールドの概要
 
クラス java.io.FilterWriter から継承したフィールド
out
 
クラス java.io.Writer から継承したフィールド
lock
 
コンストラクタの概要
AdvancedOutputStreamWriter(OutputStream out)
          推奨されていません。 デフォルトの文字エンコーディングを使う AdvancedOutputStreamWriter を作成します。
AdvancedOutputStreamWriter(OutputStream out, Charset cs)
          推奨されていません。 与えられた文字エンコーディングを使う AdvancedOutputStreamWriter を作成します。
AdvancedOutputStreamWriter(OutputStream out, CharsetEncoder enc)
          推奨されていません。 与えられた文字エンコーディングエンコーダを使う AdvancedOutputStreamWriter を作成します。
AdvancedOutputStreamWriter(OutputStream out, String charsetName)
          推奨されていません。 指定された文字エンコーディングを使う AdvancedOutputStreamWriter を作成します。
AdvancedOutputStreamWriter(OutputStreamWriter writer)
          推奨されていません。 OutputStreamWriter をフィルタリングする新しい AdvancedOutputStreamWriter を作成します。
 
メソッドの概要
static jp.co.intra_mart.common.aid.jdk.util.charset.AdvancedOutputStreamWriter createWriter(OutputStreamWriter writer)
          推奨されていません。 AdvancedOutputStreamWriter のスーパークラス AdvancedOutputStreamWriter を作成します。
 String getCharacterEncoding()
          推奨されていません。 このオブジェクトが対象としている文字エンコーディング名を返します。
 OutputStreamWriter getOutputStreamWriter()
          推奨されていません。 このオブジェクトの基礎出力となっている java.io.OutputStreamWriter を返します。
 void write(char[] cbuf, int off, int len)
          推奨されていません。 文字の配列の一部を書き込みます。
 void write(int c)
          推奨されていません。 単一の文字を書き込みます。
 void write(String str, int off, int len)
          推奨されていません。 文字列の一部を書き込みます。
 
クラス java.io.FilterWriter から継承したメソッド
close, flush
 
クラス java.io.Writer から継承したメソッド
write, write
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AdvancedOutputStreamWriter

public AdvancedOutputStreamWriter(OutputStream out,
                                  String charsetName)
                           throws UnsupportedEncodingException,
                                  ResourceNotFoundException,
                                  ResourceFormatException,
                                  IOException
推奨されていません。 
指定された文字エンコーディングを使う AdvancedOutputStreamWriter を作成します。

パラメータ:
out - 基礎となる出力ストリーム
charsetName - サポートされる charset の名前
例外:
UnsupportedEncodingException - 指定された文字エンコーディングがサポートされていない場合
NullPointerException - 引数が null の場合
ResourceNotFoundException - 対象となる文字エンコーディングに対応する設定がない場合
IOException - 設定の読み込みエラー
ResourceFormatException - 設定に不整合がある場合

AdvancedOutputStreamWriter

public AdvancedOutputStreamWriter(OutputStream out)
                           throws ResourceFormatException,
                                  ResourceNotFoundException,
                                  IOException
推奨されていません。 
デフォルトの文字エンコーディングを使う AdvancedOutputStreamWriter を作成します。

パラメータ:
out - 基礎となる出力ストリーム
例外:
NullPointerException - 引数が null の場合
ResourceNotFoundException - 対象となる文字エンコーディングに対応する設定がない場合
IOException - 設定の読み込みエラー
ResourceFormatException - 設定に不整合がある場合

AdvancedOutputStreamWriter

public AdvancedOutputStreamWriter(OutputStream out,
                                  Charset cs)
                           throws IOException,
                                  ResourceFormatException,
                                  ResourceNotFoundException
推奨されていません。 
与えられた文字エンコーディングを使う AdvancedOutputStreamWriter を作成します。

パラメータ:
out - 基礎となる出力ストリーム
cs - サポートされる Charset
例外:
NullPointerException - 引数が null の場合
ResourceNotFoundException - 対象となる文字エンコーディングに対応する設定がない場合
IOException - 入出力エラー
ResourceFormatException - 設定に不整合がある場合

AdvancedOutputStreamWriter

public AdvancedOutputStreamWriter(OutputStream out,
                                  CharsetEncoder enc)
                           throws ResourceFormatException,
                                  IOException,
                                  ResourceNotFoundException
推奨されていません。 
与えられた文字エンコーディングエンコーダを使う AdvancedOutputStreamWriter を作成します。

パラメータ:
out - 基礎となる出力ストリーム
enc - 文字エンコーディングエンコーダ
例外:
NullPointerException - 引数が null の場合
ResourceNotFoundException - 対象となる文字エンコーディングに対応する設定がない場合
IOException - 設定の読み込みエラー
ResourceFormatException - 設定に不整合がある場合

AdvancedOutputStreamWriter

public AdvancedOutputStreamWriter(OutputStreamWriter writer)
                           throws ResourceNotFoundException,
                                  IOException,
                                  ResourceFormatException
推奨されていません。 
OutputStreamWriter をフィルタリングする新しい AdvancedOutputStreamWriter を作成します。

なお、このオブジェクトが対応する文字エンコーディングは、 java.io.OutputStreamWriter#getEncoding() の返す値によって 決定します。 java.io.OutputStreamWriter#getEncoding() が null を返す場合、 このコンストラクタは NUllPointerException をスローして オブジェクトの作成に失敗します。

パラメータ:
writer - 基本となるストリームを提供する java.io.OutputStreamWriter オブジェクト
例外:
NullPointerException - 引数が null の場合
jp.co.intra_mart.common.aid.jdk.util.charset.ResourceNotFoundException - 対象となる文字エンコーディングに対応する設定がない場合
jp.co.intra_mart.common.aid.jdk.util.charset.ResourceFormatException - 設定に不整合がある場合
IOException - 設定の読み込みエラー
ResourceNotFoundException
ResourceFormatException
メソッドの詳細

createWriter

public static jp.co.intra_mart.common.aid.jdk.util.charset.AdvancedOutputStreamWriter createWriter(OutputStreamWriter writer)
                                                                                            throws IOException,
                                                                                                   ResourceNotFoundException,
                                                                                                   ResourceFormatException
推奨されていません。 
AdvancedOutputStreamWriter のスーパークラス AdvancedOutputStreamWriter を作成します。

パラメータ:
writer -
戻り値:
jp.co.intra_mart.common.aid.jdk.util.charset.AdvancedOutputStreamWriter
例外:
IOException
ResourceNotFoundException
ResourceFormatException

getCharacterEncoding

public String getCharacterEncoding()
推奨されていません。 
このオブジェクトが対象としている文字エンコーディング名を返します。

戻り値:
文字エンコーディング名

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
推奨されていません。 
文字の配列の一部を書き込みます。

パラメータ:
cbuf - き込む文字のバッファ
off - 文字の読み込み開始オフセット
len - 書き込む文字数
例外:
IOException - 入出力エラーが発生した場合

write

public void write(int c)
           throws IOException
推奨されていません。 
単一の文字を書き込みます。

パラメータ:
c - 書き込む文字を指定する int
例外:
IOException - 入出力エラーが発生した場合

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
推奨されていません。 
文字列の一部を書き込みます。

パラメータ:
str - 書き込まれる文字列
off - 文字の読み込み開始オフセット
len - 書き込む文字数
例外:
IOException - 入出力エラーが発生した場合

getOutputStreamWriter

public OutputStreamWriter getOutputStreamWriter()
推奨されていません。 
このオブジェクトの基礎出力となっている java.io.OutputStreamWriter を返します。

戻り値:
基礎となっている java.io.OutputStreamWriter

intra-mart 6.1.14

Copyright © 2000-2010 NTT DATA INTRAMART CO.,LTD.. All Rights Reserved.