| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | CSVReaderHeaderAware(Reader
The reader to an underlying CSV source reader)Constructor with supplied reader. |
| pack-priv | CSVReaderHeaderAware(Reader
The reader to an underlying CSV source reader, int The number of lines to skip before reading skipLines, ICSVParser The parser to use to parse input parser, boolean True to keep carriage returns in data read, false otherwise keepCR, boolean True to verify reader before each read, false otherwise verifyReader, int Allow the user to define the limit to the number of lines in a multiline record. Less than one means no limit. multilineLimit, Locale Set the locale for error messages. If null, the default locale is used. errorLocale, LineValidatorAggregator contains all the custom defined line validators. lineValidatorAggregator, RowValidatorAggregator contains all the custom defined row validators. rowValidatorAggregator, RowProcessor Custom row processor to run on all columns on a csv record. rowProcessor)Supports non-deprecated constructor from the parent class. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public Map | Returns: A map whose key is the header row of the data file and the values is the data values. Or null if the line is blank.Reads the next line and returns a map of header values and data values. |
| public String[] | Returns: The data element whose position matches that of the header whose value is passed in. Will return null when there are no more data elements.Name of the header element whose data we are trying to find headerNames)Retrieves a specific data element from a line based on the value of the header. |
| headerIndex | back to summary |
|---|---|
| private final Map<String, Integer> headerIndex | |
| CSVReaderHeaderAware | back to summary |
|---|---|
| public CSVReaderHeaderAware(Reader reader) throws IOException Constructor with supplied reader.
| |
| CSVReaderHeaderAware | back to summary |
|---|---|
| pack-priv CSVReaderHeaderAware(Reader reader, int skipLines, ICSVParser parser, boolean keepCR, boolean verifyReader, int multilineLimit, Locale errorLocale, LineValidatorAggregator lineValidatorAggregator, RowValidatorAggregator rowValidatorAggregator, RowProcessor rowProcessor) throws IOException Supports non-deprecated constructor from the parent class. Like the CSVReader this constructor is package scope so only the builder can use it.
| |
| initializeHeader | back to summary |
|---|---|
| private void initializeHeader() throws IOException | |
| readMap | back to summary |
|---|---|
| public Map Reads the next line and returns a map of header values and data values.
| |
| readNext | back to summary |
|---|---|
| public String[] readNext(String... headerNames) throws IOException, CsvValidationException Retrieves a specific data element from a line based on the value of the header.
| |