code: public static String flatten(List lines, String sep) {
      return flatten(lines.toArray(new Object[lines.size()]), sep);
    }
docs: Flattens the list into a single, long string. The separator string gets
  added between the objects, but not after the last one.
  
  @param lines	the lines to flatten
  @param sep		the separator
  @return		the generated string