code: public static void writePropertiesFile( Properties properties, File file ) throws IOException {
  
  		OutputStream out = null;
  		try {
  			out = new FileOutputStream( file );
  			properties.store( out, "" );
  
  		} finally {
  			closeQuietly( out );
  		}
  	}
docs: Writes Java properties into a file.
  @param properties non-null properties
  @param file a properties file
  @throws IOException if writing failed