Package org.sf.bee.commons.csv

Examples of org.sf.bee.commons.csv.CSVWriter


    //                      p u b l i c
    // ------------------------------------------------------------------------
    public String exportAsFile(final String filepath) throws IOException {
        final String destination = this.getFilePath(filepath);
        FileUtils.createParentDirs(filepath);
        final CSVWriter writer = new CSVFileWriter(destination);
        try {
            final List<DBObject> data = _srvc.find();
            this.export(writer, data);
        } catch (Throwable t) {
        }
        writer.close();
        return destination;
    }
View Full Code Here


        return destination;
    }
   
    public String exportAsString() throws IOException {
        final StringWriter output = new StringWriter();
        final CSVWriter writer = new CSVWriter(output);
        try {
            final List<DBObject> data = _srvc.find();
            this.export(writer, data);
        } catch (Throwable t) {
        }
        writer.close();
        return output.toString();
    }
View Full Code Here

TOP

Related Classes of org.sf.bee.commons.csv.CSVWriter

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.