intra-mart(R)
5.1

jp.co.intra_mart.foundation.utility.report
クラス LineReportFilter

java.lang.Object
  拡張jp.co.intra_mart.foundation.utility.report.FilterMessageReporter
      拡張jp.co.intra_mart.foundation.utility.report.LineReportFilter
すべての実装インタフェース:
MessageReporter

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

public class LineReportFilter
extends FilterMessageReporter

メッセージを行出力するためのフィルタークラスです。

このクラスを利用すると、report メソッドに渡されたメッセージ文字列に 改行コードを付加して、行出力することができます。
以下のようなプログラムにより、ログファイルをログファイルを作成することが できます。

FIle logFile = new File("test.log");
ReportFileWriter writer = new ReportFileWriter(logFile);
FileReporter writer = new FileReporter(writer);
MessageReporter reporter = new LineReportFilter(writer);
これで、変数 reporter の report メソッドを呼び出す毎に、 ファイル test.log に report メソッド指定したメッセージが 1行として出力されます。

導入されたバージョン:
version 3.2
関連項目:
ReportLevel

フィールドの概要
 
クラス jp.co.intra_mart.foundation.utility.report.FilterMessageReporter から継承したフィールド
out
 
コンストラクタの概要
LineReportFilter(MessageReporter out)
          推奨されていません。 指定された基礎出力ストリームにメッセージを一行書き込む フィルターストリームを作成します。
 
メソッドの概要
 void report(java.lang.Object data)
          推奨されていません。 基礎出力ストリームに対してメッセージを出力します。
 void report(java.lang.String message)
          推奨されていません。 メッセージを出力します。
 
クラス jp.co.intra_mart.foundation.utility.report.FilterMessageReporter から継承したメソッド
close, flush
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

LineReportFilter

public LineReportFilter(MessageReporter out)
推奨されていません。 
指定された基礎出力ストリームにメッセージを一行書き込む フィルターストリームを作成します。

パラメータ:
out - 基礎出力ストリーム
メソッドの詳細

report

public void report(java.lang.String message)
推奨されていません。 
メッセージを出力します。
このメソッドは、基礎出力ストリームに対して、message に 改行コードを付加してメッセージを1行出力します。

定義:
インタフェース MessageReporter 内の report
オーバーライド:
クラス FilterMessageReporter 内の report
パラメータ:
message - メッセージ

report

public void report(java.lang.Object data)
推奨されていません。 
基礎出力ストリームに対してメッセージを出力します。
このメソッドは、単純に data を基礎出力ストリームに渡します。 サブクラスで、このメソッドをオーバーライドすることにより、 データの加工などのフィルタリング処理を追加することができます。

定義:
インタフェース MessageReporter 内の report
オーバーライド:
クラス FilterMessageReporter 内の report
パラメータ:
data - データ

intra-mart(R)
5.1

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