T - マッピング対象のクラスpublic abstract class ObjectCsvMapperSupport<T> extends java.lang.Object implements ObjectMapper<T>
| Modifier and Type | Field and Description |
|---|---|
protected CsvDataBindConfig |
config
CSV用の設定情報
|
| Constructor and Description |
|---|
ObjectCsvMapperSupport(CsvDataBindConfig config,
java.io.Writer writer)
コンストラクタ。
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
ストリームを閉じてリソースを解放する。
|
protected abstract java.lang.Object[] |
convertValues(T object)
JavaオブジェクトをCSVに出力するための
Object配列に変換する。
変換するObject配列は、CSVファイルに出力する要素順に並べる必要がある。 |
T |
read()
オブジェクトにマッピングする。
|
void |
write(T object)
オブジェクトの情報をアウトプットする。
|
protected void |
writeHeader()
ヘッダーレコードを書き込む。
|
protected final CsvDataBindConfig config
public ObjectCsvMapperSupport(CsvDataBindConfig config, java.io.Writer writer)
config - フォーマット定義writer - 出力リソースprotected void writeHeader()
public T read()
ObjectMapperread in interface ObjectMapper<T>public void write(T object)
ObjectMapperwrite in interface ObjectMapper<T>object - オブジェクトprotected abstract java.lang.Object[] convertValues(T object)
Object配列に変換する。
変換するObject配列は、CSVファイルに出力する要素順に並べる必要がある。object - Javaオブジェクトpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface ObjectMapper<T>