code: public void write(Map<?, ?> row) throws IOException {
        if (row != null) {
           if (header.isEmpty()) {
              List<?> entries = row.values().stream().map(o -> Convert.convert(o, String.class)).collect(
                 Collectors.toList());
              writer.write(formatter.format(entries));
              writer.write(SystemInfo.LINE_SEPARATOR);
           } else {
              writer.write(
                 formatter.format(
                    Stream.concat(
                       header.stream()
                             .map(
                                h -> row.containsKey(h) ? Convert.convert(row.get(h), String.class) : StringUtils.EMPTY),
                       row.keySet().stream()
                          .map(k -> Convert.convert(k, String.class))
                          .filter(h -> !header.contains(h))
                          .map(h -> Convert.convert(row.get(h), String.class))
                                 )
                          .collect(Collectors.toList())
                                 )
                          );
              writer.write(SystemInfo.LINE_SEPARATOR);
           }
  
        }
  
     }
docs: Writes the items in the row to the resource in DSV format.
  
  @param row the row
  @throws IOException Signals that an I/O exception has occurred.