@Test public void testWrite() throws IOException { mapWriter.writeHeader(HEADER); for( CustomerStringBean customer : STRING_CUSTOMERS ) { Map<String, Object> customerMap = new HashMap<String, Object>(); Util.filterListToMap( customerMap, HEADER, Arrays.asList(new String[] { customer.getCustomerNo(), customer.getFirstName(), customer.getLastName(), customer.getBirthDate(), customer.getBirthTime(), customer.getMailingAddress(), customer.getMarried(), customer.getNumberOfKids(), customer.getFavouriteQuote(), customer.getEmail(), customer.getLoyaltyPoints() })); mapWriter.write(customerMap, HEADER); } mapWriter.flush(); assertEquals(CSV_FILE, writer.toString()); }
public void write(final Map<String, ?> values, final String... nameMapping) throws IOException { super.incrementRowAndLineNo(); super.writeRow(Util.filterMapToObjectArray(values, nameMapping)); }
CsvMapWriter extends AbstractCsvWriter implements ICsvMapWriter { public void write(final Map<String, ?> values, final String... nameMapping) throws IOException { super.incrementRowAndLineNo(); super.writeRow(Util.filterMapToObjectArray(values, nameMapping)); } }
CsvMapWriter extends AbstractCsvWriter implements ICsvMapWriter { public void write(final Map<String, ?> values, final String... nameMapping) throws IOException { super.incrementRowAndLineNo(); super.writeRow(Util.filterMapToObjectArray(values, nameMapping)); } CsvMapWriter(final Writer writer, final CsvPreference preference);  CsvMapWriter(final Writer writer, final CsvPreference preference, boolean bufferizeWriter); }
CsvMapWriter extends AbstractCsvWriter implements ICsvMapWriter { public void write(final Map<String, ?> values, final String... nameMapping) throws IOException { super.incrementRowAndLineNo(); super.writeRow(Util.filterMapToObjectArray(values, nameMapping)); } CsvMapWriter(final Writer writer, final CsvPreference preference);  CsvMapWriter(final Writer writer, final CsvPreference preference, boolean bufferizeWriter); void write(final Map<String, ?> values, final String... nameMapping); void write(final Map<String, ?> values, final String[] nameMapping, final CellProcessor[] processors); }
CsvMapWriter extends AbstractCsvWriter implements ICsvMapWriter { public void write(final Map<String, ?> values, final String... nameMapping) throws IOException { super.incrementRowAndLineNo(); super.writeRow(Util.filterMapToObjectArray(values, nameMapping)); } CsvMapWriter(final Writer writer, final CsvPreference preference);  CsvMapWriter(final Writer writer, final CsvPreference preference, boolean bufferizeWriter); void write(final Map<String, ?> values, final String... nameMapping); void write(final Map<String, ?> values, final String[] nameMapping, final CellProcessor[] processors);  }