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

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

public class RecordFieldWriterFormat
extends Object
implements RecordFieldWriterFormatable

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

作成者:
Jianming Guo

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

コンストラクタの詳細

RecordFieldWriterFormat

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

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

format

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

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

padding

public String padding(String length,
                      String algin,
                      String padding,
                      String data)
               throws DataFormatException
引数の文字列をパディングします。

定義:
インタフェース RecordFieldWriterFormatable 内の padding
パラメータ:
length - バイト数
algin - アラインメント指定子(右寄せ・左寄せ)
padding - パディング文字
data - パディング対象の文字列
戻り値:
パディング後の文字列
例外:
DataFormatException - 引数に指定された値のフォーマットに間違いがある場合に発生します。


Copyright © 2008 Cyber Beans Corporation. All Rights Reserved.