Write a configuration file to an output stream with the configuration for classes.
176423
public static void writeConfigFile(OutputStream outputStream, File searchDir) throws SQLException, IOException {
		writeConfigFile(outputStream, searchDir, false);
	}
1276269
def _write_config(self):
        """"""

        if not self.config:
            self.log("Unable to write non existing configuration", lvl=error)
            return

        self.config.save()
        self.log("Configuration stored.")
1121897
def write(self):
        """"""
        if self.dirty:
            with open(self._cache_path, "w") as output_file:
                self._config.write(output_file)
495555
public static void writeConfigFile(File configFile, boolean sortClasses) throws SQLException, IOException {
		writeConfigFile(configFile, new File("."), sortClasses);
	}
955983
def write_config(configfile, content):
    
    with open(configfile, 'w+') as ymlfile:
        yaml.dump(
            content,
            ymlfile,
            default_flow_style=False,
        )
12710
public void write(@WillClose OutputStream out) throws IOException {
        BufferedWriter writer = null;
        boolean missingClassWarningsSuppressed = AnalysisContext.currentAnalysisContext().setMissingClassWarningsSuppressed(true);

        try {
            writer = new BufferedWriter(new OutputStreamWriter(out, UTF8.charset));

            TreeSet<KeyType> sortedMethodSet = new TreeSet<>();
            sortedMethodSet.addAll(propertyMap.keySet());
            for (KeyType key : sortedMethodSet) {
                if (AnalysisContext.currentAnalysisContext().isApplicationClass(key.getClassDescriptor())) {

                    ValueType property = propertyMap.get(key);

                    writeKey(writer, key);
                    writer.write("|");
                    writer.write(encodeProperty(property));
                    writer.write("\n");
                }
            }
        } finally {
            AnalysisContext.currentAnalysisContext().setMissingClassWarningsSuppressed(missingClassWarningsSuppressed);

            try {
                if (writer != null) {
                    writer.close();
                }
            } catch (IOException e) {
                // Ignore
            }
        }
    }
48118
def Write(self):
    """"""
    if self.writeback:
      self.writeback.SaveData(self.writeback_data)
    else:
      raise RuntimeError("Attempting to write a configuration without a "
                         "writeback location.")
672952
def write_config(self):
        
        if not os.path.exists(os.path.dirname(self.config_file)):
            os.makedirs(os.path.dirname(self.config_file))
        with open(self.config_file, 'w') as f:
            f.write(json.dumps(self.config))
            f.close()
794097
def write_config(self):
        """"""
        config_file = os.path.join(self.config_dir, 'pueue.ini')
        with open(config_file, 'w') as file_descriptor:
            self.config.write(file_descriptor)
554258
public static void generate(ConfigurationImpl configuration, ClassUseMapper mapper,
                                TypeElement typeElement) throws DocFileIOException {
        ClassUseWriter clsgen;
        DocPath path = DocPath.forPackage(configuration.utils, typeElement)
                              .resolve(DocPaths.CLASS_USE)
                              .resolve(DocPath.forName(configuration.utils, typeElement));
        clsgen = new ClassUseWriter(configuration, mapper, path, typeElement);
        clsgen.generateClassUseFile();
    }
1324434
public void write(@WillClose OutputStream out) throws IOException {

        Properties props = new SortedProperties();

        for (int i = 0; i < recentProjectsList.size(); i++) {
            String projectName = recentProjectsList.get(i);
            String key = "recent" + i;
            props.put(key, projectName);
        }

        Iterator<Entry<String, Boolean>> it = detectorEnablementMap.entrySet().iterator();
        while (it.hasNext()) {
            Entry<String, Boolean> entry = it.next();
            props.put("detector" + entry.getKey(), entry.getKey() + BOOL_SEPARATOR + String.valueOf(entry.getValue().booleanValue()));
        }

        // Save ProjectFilterSettings
        props.put(FILTER_SETTINGS_KEY, filterSettings.toEncodedString());
        props.put(FILTER_SETTINGS2_KEY, filterSettings.hiddenToEncodedString());

        // Backwards-compatibility: save minimum warning priority as integer.
        // This will allow the properties file to work with older versions
        // of FindBugs.
        props.put(DETECTOR_THRESHOLD_KEY, String.valueOf(filterSettings.getMinPriorityAsInt()));
        props.put(RUN_AT_FULL_BUILD, String.valueOf(runAtFullBuild));
        props.setProperty(EFFORT_KEY, effort);
        writeProperties(props, KEY_INCLUDE_FILTER, includeFilterFiles);
        writeProperties(props, KEY_EXCLUDE_FILTER, excludeFilterFiles);
        writeProperties(props, KEY_EXCLUDE_BUGS, excludeBugsFiles);
        writeProperties(props, KEY_PLUGIN, customPlugins);

        OutputStream prefStream = null;
        try {
            prefStream = new BufferedOutputStream(out);
            props.store(prefStream, "SpotBugs User Preferences");
            prefStream.flush();
        } finally {
            try {
                if (prefStream != null) {
                    prefStream.close();
                }
            } catch (IOException ioe) {
            }
        }
    }
1221154
def write_configuration(self, out, secret_attrs=False):
        """"""
        key_order = ['repo_nexml2json',
                     'number_of_shards',
                     'initialization', ]
        cd = self.get_configuration_dict(secret_attrs=secret_attrs)
        for k in key_order:
            if k in cd:
                out.write('  {} = {}'.format(k, cd[k]))
        for n, shard in enumerate(self._shards):
            out.write('Shard {}:\n'.format(n))
            shard.write_configuration(out)
654536
def write_config_file(path, config):
    """"""
    contents = json.dumps(config, indent=4, separators=(',', ': ')) + '\n'
    try:
        with open(path, 'w') as f:
            f.write(contents)
        return True
    except IOError as ex:
        if ex != errno.ENOENT:
            raise
    return False
610874
protected void writeHeader()
		throws ConfigurationException, IOException
	{

		if (writer != null) {
			writer.close();
		}

		this.fileCounter++;
		String filePath = PATH_OUTPUT_DATA_FILES + this.outputName + "_"
				+ fileCounter+".csv";

		this.dataFile = new File(filePath);

		this.writer = new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(
		        new FileOutputStream(filePath)), WIKIPEDIA_ENCODING));


		this.writer.flush();
	}
905008
private static void dumpConfiguration(Writer writer) throws IOException {
    Configuration.dumpConfiguration(new JobConf(), writer);
    writer.write("\n");
    // get the QueueManager configuration properties
    QueueManager.dumpConfiguration(writer);
    writer.write("\n");
  }
432904
public void write(Writer writer, Map<String, String> outputProperties) throws TransformerException {
		Transformer transformer;
		try {
			transformer = TransformerFactory.newInstance().newTransformer();
		} catch (TransformerConfigurationException e) {
			//should never be thrown because we're not doing anything fancy with the configuration
			throw new RuntimeException(e);
		} catch (TransformerFactoryConfigurationError e) {
			//should never be thrown because we're not doing anything fancy with the configuration
			throw new RuntimeException(e);
		}

		/*
		 * Using Transformer#setOutputProperties(Properties) doesn't work for
		 * some reason for setting the number of indentation spaces.
		 */
		for (Map.Entry<String, String> entry : outputProperties.entrySet()) {
			String key = entry.getKey();
			String value = entry.getValue();
			transformer.setOutputProperty(key, value);
		}

		DOMSource source = new DOMSource(document);
		StreamResult result = new StreamResult(writer);
		transformer.transform(source, result);
	}
1323690
def write_files(self, jdoc, output_dir):
        ''''''

        #get all distinct schema names from jdoc:
        schemas = [j for j in jdoc if j.object_type == 'schema']
        schemas = [j for j in schemas if len([x for x in jdoc if x.object_type != 'schema' and x.schema_name == j.object_name]) > 0]
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)
        try:
            shutil.copytree(self.template_dir + os.sep + 'styles',
                            output_dir + os.sep + 'styles')
        except FileExistsError:
            None
        for schema in schemas:
            with open(output_dir + os.sep + schema.object_name + '.html', 'w') as f:
                f.write(self.generate_html(jdoc, schema, schemas))
        with open(output_dir + os.sep + 'index.html', 'w') as f:
            f.write(self.generate_index(schemas))