|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.terasoluna.fw.file.dao.standard.AbstractFileLineIterator<T>
jp.terasoluna.fw.file.dao.standard.VariableFileLineIterator<T>
T
- ファイル行オブジェクトpublic class VariableFileLineIterator<T>
可変長ファイルファイル用のファイルアクセス(データ取得)クラス。
可変長ファイルからデータを読み込み、1行分のデータをファイル行オブジェクトに 格納する。
CSVファイルでは区切り文字がカンマで固定されているが、可変長ファイルでは カンマ以外を利用することが可能。
FileFormat
の設定項目論理項目名 | 物理項目名 | デフォルト値 | 必須性 |
行区切り文字 |
lineFeedChar |
システムの行区切り文字 |
オプション |
区切り文字 |
delimiter |
',' |
オプション |
囲み文字 |
encloseChar |
なし(' ') |
オプション |
ファイルエンコーディング |
fileEncodeing |
システムのファイルエンコーディング |
オプション |
ヘッダ行数 |
headerLineCount |
0 |
オプション |
トレイラ行数 |
trailerLineCount |
0 |
オプション |
InputFileColumn
、@OutputFileColumn
の設定項目論理項目名 | 物理項目名 | デフォルト値 | 必須性 |
カラムインデックス |
columnIndex |
- | 必須 |
フォーマット |
columnFormat |
"" |
オプション |
バイト長 |
bytes |
-1 |
オプション |
パディング種別 |
paddingType |
パディングなし |
オプション |
パディング文字 |
paddingChar |
' ' |
オプション |
トリム種別 |
trimType |
トリムなし |
オプション |
トリム文字 |
trimChar |
' ' |
オプション |
文字変換種別 |
stringConverter |
NullStringConverter.class |
オプション |
コンストラクタの概要 | |
---|---|
VariableFileLineIterator(String fileName,
Class<T> clazz,
Map<String,ColumnParser> columnParserMap)
コンストラクタ。 |
メソッドの概要 | |
---|---|
char |
getDelimiter()
区切り文字を取得する。 |
char |
getEncloseChar()
囲み文字を取得する。 |
protected String[] |
separateColumns(String fileLineString)
読み込んだファイルのレコードを、区切り文字、 囲み文字に従って 文字配列に変換する。 |
クラス jp.terasoluna.fw.file.dao.standard.AbstractFileLineIterator から継承されたメソッド |
---|
closeFile, getColumnBytes, getColumnEncloseChar, getCurrentLineCount, getFields, getFileEncoding, getFileName, getHeader, getHeaderLineCount, getLineFeedChar, getTotalBytes, getTrailer, getTrailerLineCount, hasNext, init, isCheckByte, isCheckByte, isCheckColumnAnnotationCount, isCheckEncloseChar, isEnclosed, next, readLine, remove, setLineFeedChar, skip |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public VariableFileLineIterator(String fileName, Class<T> clazz, Map<String,ColumnParser> columnParserMap)
fileName
- ファイル名clazz
- ファイル行オブジェクトクラスcolumnParserMap
- テキスト設定ルールメソッドの詳細 |
---|
protected String[] separateColumns(String fileLineString)
fileLineString
がnull
もしくは 空文字の場合は、要素を持たないString
配列を返します。
AbstractFileLineIterator<T>
内の separateColumns
fileLineString
- 可変長ファイルの1レコード分の文字列
public char getDelimiter()
AbstractFileLineIterator<T>
内の getDelimiter
public char getEncloseChar()
AbstractFileLineIterator<T>
内の getEncloseChar
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |