T
- ファイル行オブジェクト。public class FixedFileLineIterator<T> extends AbstractFileLineIterator<T>
固定長ファイルからデータを読み込み、 1行分のデータをファイル行オブジェクトに格納する。
※利用するファイル行オブジェクトのアノテーション項目FileFormat
の設定項目論理項目名 | 物理項目名 | デフォルト値 | 必須性 |
行区切り文字 |
lineFeedChar |
システムの行区切り文字 |
オプション |
ファイルエンコーディング |
fileEncodeing |
システムのファイルエンコーディング |
オプション |
ヘッダ行数 |
headerLineCount |
0 |
オプション |
トレイラ行数 |
trailerLineCount |
0 |
オプション |
InputFileColumn
、@OutputFileColumn
の設定項目論理項目名 | 物理項目名 | デフォルト値 | 必須性 |
カラムインデックス |
columnIndex |
- | 必須 |
フォーマット |
columnFormat |
"" |
オプション |
バイト長 |
bytes |
-1 |
オプション |
パディング種別 |
paddingType |
パディングなし |
オプション |
パディング文字 |
paddingChar |
' ' |
オプション |
トリム種別 |
trimType |
トリムなし |
オプション |
トリム文字 |
trimChar |
' ' |
オプション |
文字変換種別 |
stringConverter |
NullStringConverter.class |
オプション |
コンストラクタと説明 |
---|
FixedFileLineIterator(String fileName,
Class<T> clazz,
Map<String,ColumnParser> columnParserMap)
コンストラクタ。
|
修飾子とタイプ | メソッドと説明 |
---|---|
char |
getDelimiter()
区切り文字を取得する。
|
char |
getEncloseChar()
囲み文字を取得する。
|
protected boolean |
isCheckByte(InputFileColumn inputFileColumn)
対象カラムに対するバイト数チェックを行うかを返す。
|
protected boolean |
isCheckByte(int columnByte)
対象カラムに対するバイト数チェックを行うかを返す。
|
protected boolean |
isCheckEncloseChar()
囲み文字が設定されていない事をチェックするかを返す。
|
protected String[] |
separateColumns(String fileLineString)
読み込んだ固定長のレコードをアノテーションのbyte数、 columnIndexに従って分解する。
|
closeFile, getColumnBytes, getColumnEncloseChar, getCurrentLineCount, getFields, getFileEncoding, getFileName, getHeader, getHeaderLineCount, getLineFeedChar, getTotalBytes, getTrailer, getTrailerLineCount, hasNext, init, isCheckColumnAnnotationCount, isEnclosed, next, readLine, remove, setLineFeedChar, skip
protected String[] separateColumns(String fileLineString)
fileLineString
がnull
もしくは 空文字の場合は、要素を持たないString
配列を返します。
処理の順序は、
separateColumns
クラス内 AbstractFileLineIterator<T>
fileLineString
- 固定長ファイルの1レコード分の文字列protected boolean isCheckByte(InputFileColumn inputFileColumn)
isCheckByte
クラス内 AbstractFileLineIterator<T>
inputFileColumn
- 対象カラムのInputFileColumn情報protected boolean isCheckByte(int columnByte)
isCheckByte
クラス内 AbstractFileLineIterator<T>
columnByte
- 対象カラムのバイト数protected boolean isCheckEncloseChar()
isCheckEncloseChar
クラス内 AbstractFileLineIterator<T>
public char getDelimiter()
getDelimiter
クラス内 AbstractFileLineIterator<T>
public char getEncloseChar()
getEncloseChar
クラス内 AbstractFileLineIterator<T>
Copyright © 2014 NTT DATA Corporation.