kmlconverter
Class CSVFile

java.lang.Object
  extended by kmlconverter.CSVFile

public class CSVFile
extends Object

Class used to process CSV File in order to prepeare it to be displayed in main application main window. Has only two methods. One to process first line of the file where column names are expected to be. And another to process the rest of the CSV file where actual data shuld be.


Constructor Summary
CSVFile()
           
 
Method Summary
 ArrayList<ArrayList> openFile(String fileName, String delimeter)
           
 ArrayList<String> openFileGetHeaders(String fileName, String delimiter)
           
protected static ArrayList<ArrayList> processData(BufferedReader is, String delimiter)
           
static ArrayList<String> processHeader(BufferedReader is, String delimiter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVFile

public CSVFile()
Method Detail

openFile

public ArrayList<ArrayList> openFile(String fileName,
                                     String delimeter)
                              throws FileNotFoundException,
                                     IOException
Parameters:
fileName - - path to the CSV file to be imported
delimeter -
Returns:
ArrayList - procesed data
Throws:
FileNotFoundException
IOException

openFileGetHeaders

public ArrayList<String> openFileGetHeaders(String fileName,
                                            String delimiter)
                                     throws FileNotFoundException,
                                            IOException,
                                            kmlconverter.WrongFileException
Parameters:
fileName -
delimiter -
Returns:
Throws:
FileNotFoundException
IOException
WrongFileException

processData

protected static ArrayList<ArrayList> processData(BufferedReader is,
                                                  String delimiter)
                                           throws IOException
Parameters:
is -
delimiter -
Returns:
Throws:
IOException

processHeader

public static ArrayList<String> processHeader(BufferedReader is,
                                              String delimiter)
                                       throws IOException
Parameters:
is -
delimiter -
Returns:
Throws:
IOException