Package Readers

Examples of Readers.FileReader


     * @throws BiffException
     * @throws Exception
     */
    public void importData(String dataFilePath)throws FileNotFoundException, IOException, BiffException, Exception{
        dataFilePath = dataFilePath.toLowerCase();
        FileReader fileReader=null;
        if(dataFilePath.endsWith("csv")){
            BufferedReader in=null;
            in = new BufferedReader(new java.io.FileReader(dataFilePath));
            fileReader = new CSVReader(in);
        }
        if(dataFilePath.endsWith("xls")){
            fileReader = new XLSReader(new File(dataFilePath));
        }
        if(dataFilePath.endsWith("wss")){
            fileReader = new WSSReader(new File(dataFilePath));
        }
        if (fileReader!=null)
            data = fileReader.readData();
        else throw new Exception("Usupported File Extension");
        dataImported = true;


    }
View Full Code Here

TOP

Related Classes of Readers.FileReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.