Search in sources :

Example 1 with CsvMapWriter

use of org.supercsv.io.CsvMapWriter in project Xponents by OpenSextant.

the class TestXTemporalReporter method open.

/**
     *
     * @param file
     * @return
     * @throws IOException
     */
public final CsvMapWriter open(String file) throws IOException {
    FileUtility.makeDirectory(new File(file).getParentFile());
    OutputStreamWriter iowriter = FileUtility.getOutputStream(file, "UTF-8");
    CsvMapWriter R = new CsvMapWriter(iowriter, CsvPreference.STANDARD_PREFERENCE);
    return R;
}
Also used : OutputStreamWriter(java.io.OutputStreamWriter) CsvMapWriter(org.supercsv.io.CsvMapWriter) File(java.io.File)

Example 2 with CsvMapWriter

use of org.supercsv.io.CsvMapWriter in project Xponents by OpenSextant.

the class CSVFormatter method start.

@Override
public void start(String nm) throws ProcessingException {
    try {
        buildSchema();
        createOutputStreams();
        writer = new CsvMapWriter(fio, CsvPreference.EXCEL_PREFERENCE);
        writer.writeHeader(header);
    } catch (Exception err) {
        throw new ProcessingException("Failed to launch", err);
    }
}
Also used : CsvMapWriter(org.supercsv.io.CsvMapWriter) ConfigException(org.opensextant.ConfigException) ProcessingException(org.opensextant.processing.ProcessingException) ProcessingException(org.opensextant.processing.ProcessingException)

Example 3 with CsvMapWriter

use of org.supercsv.io.CsvMapWriter in project Xponents by OpenSextant.

the class TestPoLiReporter method open.

/**
     * Create a typical CSV writer -- Excel compliant
     *
     * @param file
     * @return
     * @throws IOException
     */
public CsvMapWriter open(String file) throws IOException {
    FileUtility.makeDirectory(new File(file).getParentFile());
    OutputStreamWriter iowriter = FileUtility.getOutputStream(file, "UTF-8");
    CsvMapWriter R = new CsvMapWriter(iowriter, CsvPreference.STANDARD_PREFERENCE);
    return R;
}
Also used : OutputStreamWriter(java.io.OutputStreamWriter) CsvMapWriter(org.supercsv.io.CsvMapWriter) File(java.io.File)

Example 4 with CsvMapWriter

use of org.supercsv.io.CsvMapWriter in project Xponents by OpenSextant.

the class TestXCoordReporter method open.

/**
     * Create a typical CSV writer -- Excel compliant
     *
     * @param file
     * @return
     * @throws IOException
     */
public CsvMapWriter open(String file) throws IOException {
    FileUtility.makeDirectory(new File(file).getParentFile());
    OutputStreamWriter iowriter = FileUtility.getOutputStream(file, "UTF-8");
    CsvMapWriter R = new CsvMapWriter(iowriter, CsvPreference.STANDARD_PREFERENCE);
    return R;
}
Also used : CsvMapWriter(org.supercsv.io.CsvMapWriter)

Aggregations

CsvMapWriter (org.supercsv.io.CsvMapWriter)4 File (java.io.File)2 OutputStreamWriter (java.io.OutputStreamWriter)2 ConfigException (org.opensextant.ConfigException)1 ProcessingException (org.opensextant.processing.ProcessingException)1