int fileType = dialog.getFileType().getSelectedIndex();
DataSetCODEC codec;
BinaryDataLoader loader;
if (fileType == 0) {
DialogCSV dialog2 = new DialogCSV(EncogWorkBench.getInstance()
.getMainWindow());
if (dialog2.process()) {
boolean headers = dialog2.getHeaders().getValue();
CSVFormat format;
if (dialog2.getDecimalComma().getValue())
format = CSVFormat.DECIMAL_COMMA;
else
format = CSVFormat.DECIMAL_POINT;
codec = new CSVDataCODEC(externFile, format,
dialog2.getGenerateSignificance().getValue());
loader = new BinaryDataLoader(codec);
ImportExportDialog dlg = new ImportExportDialog(loader,
binaryFile, false);
dlg.process(done);