jp.co.cybec.cb3.accessor.fileaccess
クラス RecordFieldReaderFormat

java.lang.Object
  上位を拡張 jp.co.cybec.cb3.accessor.fileaccess.RecordFieldReaderFormat
すべての実装されたインタフェース:
RecordFieldReaderFormatable

public class RecordFieldReaderFormat
extends Object
implements RecordFieldReaderFormatable

ファイルのレコード項目をフォーマットするクラス(Reader用)。

作成者:
Jianming Guo

コンストラクタの概要
RecordFieldReaderFormat(String filepath, String field)
          コンストラクタ
 
メソッドの概要
 String format(String pattern, String type, String data)
          引数の文字列をフォーマットします。
 String trim(String algin, String padding, String data)
          引数の文字列をトリムします。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

RecordFieldReaderFormat

public RecordFieldReaderFormat(String filepath,
                               String field)
コンストラクタ

パラメータ:
filepath - 設定ファイルパス
field - 項目名
メソッドの詳細

format

public String format(String pattern,
                     String type,
                     String data)
              throws DataFormatException
引数の文字列をフォーマットします。

定義:
インタフェース RecordFieldReaderFormatable 内の format
パラメータ:
pattern - フォーマット
type - タイプ
data - フォーマット対象の文字列
戻り値:
フォーマット後の文字列
例外:
DataFormatException - データ型の変換に失敗したときに発生します。

trim

public String trim(String algin,
                   String padding,
                   String data)
            throws DataFormatException
引数の文字列をトリムします。 (パディング文字を取り除きます)

定義:
インタフェース RecordFieldReaderFormatable 内の trim
パラメータ:
algin - アラインメント指定子(右寄せ・左寄せ)
padding - パディング文字
data - トリム対象の文字列
戻り値:
パディング文字を取り除いた文字列
例外:
DataFormatException - アラインメント指定子、パディング文字の指定に間違いがある場合に発生します。


Copyright © 2008 Cyber Beans Corporation. All Rights Reserved.