code: public static void writeLinesToFile(final Collection<String> collection, final File output,
  		final String encoding) throws FileNotFoundException, IOException
  	{
  		final StringBuffer sb = new StringBuffer();
  		for (final String element : collection)
  		{
  			sb.append(element);
  			sb.append("\n");
  		}
  		string2File(output, sb.toString(), encoding);
  	}
docs: Writes the input from the collection into the file.
  
  @param collection
  The collection to write to file.
  @param output
  The output-file.
  @param encoding
  the encoding
  @throws FileNotFoundException
  is thrown if an attempt to open the file denoted by a specified pathname has
  failed.
  @throws IOException
  Signals that an I/O exception has occurred.