Examples/src/main/java/org/openestate/io/examples/IdxWritingExample.java
protected static void write(List<IdxRecord> records, File file) {
        LOGGER.info("writing document");
        try (IdxPrinter printer = IdxPrinter.create(file)) {
            printer.printRecords(records);
            LOGGER.info("> written to: " + file.getAbsolutePath());
        } catch (Exception ex) {
            LOGGER.error("Can't write document into a file!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }
    }
protected static void write(List<IdxRecord> records, File file) {
        LOGGER.info("writing document");
        try (IdxPrinter printer = IdxPrinter.create(file)) {
            printer.printRecords(records);
            LOGGER.info("> written to: " + file.getAbsolutePath());
        } catch (Exception ex) {
            LOGGER.error("Can't write document into a file!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }
    }
protected static void write ( List < IdxRecord > records , File file ) { LOGGER . info ( "writing document" ) ; try ( IdxPrinter printer = IdxPrinter . create ( file ) ) { printer . printRecords ( records ) ; LOGGER . info ( "> written to: " + file . getAbsolutePath ( ) ) ; } catch ( Exception ex ) { LOGGER . error ( "Can't write document into a file!" ) ; LOGGER . error ( "> " + ex . getLocalizedMessage ( ) , ex ) ; System . exit ( 1 ) ; } }
Write some {@link IdxRecord} objects into a {@link File}.

@param records the CSV records to write
@param file    the file, where the document is written to
Write some { @link IdxRecord } objects into a { @link File } .