org.apache.camel.dataformat.csv
Class CsvLineConverters

java.lang.Object
  extended by org.apache.camel.dataformat.csv.CsvLineConverters

public final class CsvLineConverters
extends Object

This CsvLineConverters class provides common implementations of the CsvLineConverter interface.


Method Summary
static CsvLineConverter<List<String>> getListConverter()
          Provides an implementation of CsvLineConverter that converts a line into a List.
static CsvLineConverter<Map<String,String>> getMapLineConverter(String[] headers)
          Provides an implementation of CsvLineConverter that converts a line into a Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getListConverter

public static CsvLineConverter<List<String>> getListConverter()
Provides an implementation of CsvLineConverter that converts a line into a List.

Returns:
List-based CsvLineConverter implementation

getMapLineConverter

public static CsvLineConverter<Map<String,String>> getMapLineConverter(String[] headers)
Provides an implementation of CsvLineConverter that converts a line into a Map.

It requires to have unique headers values as well as the same number of item in each line.

Parameters:
headers - Headers of the CSV file
Returns:
Map-based CsvLineConverter implementation


Apache Camel