code: public static String listToCSVString(final List<?> list) {
          final StringBuilder buf = new StringBuilder();
  
          if (list != null) {
              boolean needComma = false;
              for (final Object o : list) {
                  if (needComma) {
                      buf.append(",");
                  }
                  buf.append(StringUtil.toStringOrEmpty(o));
                  needComma = true;
              }
          }
  
          return buf.toString();
      }
docs: convert a list to a comma separated string.
  This is a VERY basic parsing/creation of CSV, if you seen anything superior then use <a href="http://flatpack.sf.net">FlatPack</a>.
  @param list
  list to "print"
  @return a String comma separated.
  @see <a href="http://flatpack.sf.net">FlatPack</a> for more comprehensive parser