net.sourceforge.addam.impexp.csv
Class MapCSVParser

java.lang.Object
  extended by net.sourceforge.addam.impexp.csv.CSVParser
      extended by net.sourceforge.addam.impexp.csv.MapCSVParser

public class MapCSVParser
extends CSVParser

Parses a CSV file, reading the first line as a header line containing keys; each record is returned as a map from the header line key to the column value. If any row has a different number of columns as the header row, an IndexOutOfBoundsException is thrown.

Since:
Sep 21, 2004
Author:
Tim Dawson

Field Summary
private  List keys
           
 
Constructor Summary
MapCSVParser(Reader in)
           
 
Method Summary
private  List getKeys()
           
 Map readMap()
           
 
Methods inherited from class net.sourceforge.addam.impexp.csv.CSVParser
getCharNumber, getCol, getExcelCell, getExcelCell, getLineNumber, getRow, nextLine, readField, readLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keys

private List keys
Constructor Detail

MapCSVParser

public MapCSVParser(Reader in)
Method Detail

getKeys

private List getKeys()
              throws IOException,
                     CSVFormatException
Throws:
IOException
CSVFormatException

readMap

public Map readMap()
            throws IOException,
                   CSVFormatException
Throws:
IOException
CSVFormatException


Copyright © 2005-2006 ADDAM Project Team. All Rights Reserved.