code: public String format(Iterator<?> itr) {
      StringBuilder rowString = new StringBuilder();
  
      for (; itr.hasNext(); ) {
        Object n = itr.next();
        String s = n == null ? StringUtils.EMPTY : n.toString();
        if (escape.equals("\\")) {
          s = s.replaceAll(Pattern.quote(escape), doubleEscape + doubleEscape);
        } else {
          s = s.replaceAll(Pattern.quote(escape), doubleEscape);
        }
        s = s.replaceAll(Pattern.quote(comment), doubleEscape + comment);
        if (s.contains(delimiter) || s.contains("\r") || s.contains("\n") || s.contains(quote)) {
          rowString.append(quote);
          s = s.replaceAll(Pattern.quote(quote), doubleQuote);
          rowString.append(s);
          rowString.append(quote);
        } else {
          rowString.append(s);
        }
  
        if (itr.hasNext()) {
          rowString.append(delimiter);
        }
      }
      return rowString.toString();
    }
docs: Formats the items in an <code>Iterator</code>.
  
  @param itr The iterator to format
  @return A String representing the single DSV formatted row