Package org.marketcetera.modules.csv
Class CSVEmitter.CSVReader
- java.lang.Object
-
- org.marketcetera.modules.csv.CSVEmitter.CSVReader
-
-
Field Summary
Fields Modifier and Type Field Description private booleanmReverseprivate URLmSourceprivate DataEmitterSupportmSupport
-
Constructor Summary
Constructors Modifier Constructor Description privateCSVReader(URL inSource, DataEmitterSupport inSupport, boolean inReverse)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Booleancall()private Map<String,String>createMap(String[] inKeys, String[] inValues)Creates a map instance with the supplied key value arrays.
-
-
-
Field Detail
-
mSource
private final URL mSource
-
mReverse
private final boolean mReverse
-
mSupport
private final DataEmitterSupport mSupport
-
-
Constructor Detail
-
CSVReader
private CSVReader(URL inSource, DataEmitterSupport inSupport, boolean inReverse)
Creates an instance.- Parameters:
inSource- The URL from which the csv file can be read.inSupport- the handle to emit data.inReverse- if the emitter should reverse the rows, emitting the last row first.
-
-
Method Detail
-
createMap
private Map<String,String> createMap(String[] inKeys, String[] inValues)
Creates a map instance with the supplied key value arrays.- Parameters:
inKeys- The keys to be used in the map.inValues- The values to be used in the map.- Returns:
- A map instance containing key value pairs extracted from the supplied array. The map's size is the same size as the length of the supplied inKeys array.
-
-