Converts the Swagger specification the given {@code outputFile}.<br>
An extension identifying the markup language will be automatically added to file name.

@param outputFile the output file
171745
public void toFile(Path outputFile) {
        Validate.notNull(outputFile, "outputFile must not be null");

        applyOverviewDocument().writeToFile(outputFile, StandardCharsets.UTF_8);
        applyPathsDocument().writeToFile(outputFile, StandardCharsets.UTF_8, StandardOpenOption.APPEND);
        applyDefinitionsDocument().writeToFile(outputFile, StandardCharsets.UTF_8, StandardOpenOption.APPEND);
        applySecurityDocument().writeToFile(outputFile, StandardCharsets.UTF_8, StandardOpenOption.APPEND);
    }
825831
public static void convertFile(File keyFile, int toFormat, File toFile)
			throws IOException {

		SshPublicKeyFile pub = parse(new FileInputStream(keyFile));
		createFile(pub.toPublicKey(), pub.getComment(), toFormat, toFile);
	}
893176
public static void setLogfile(Class<? extends IRTLogger> loggerClass,
			File outputFile) throws FileNotFoundException
	{
		for (IRTLogger logger : loggers)
		{
			if (logger.getClass() == loggerClass)
			{
				logger.setLogfile(outputFile);
				logger.dump(true); // Write out and close previous
			}
		}

		enable(true);
	}
1033459
static Log create(File outputFile) {
    try {
      return new Log(
              new PrintStream(
                 outputFile.getName().endsWith(".gz") ?
                   new GZIPOutputStream(new FileOutputStream(outputFile))
                 : new FileOutputStream(outputFile)),
              false);  
    } 
    catch (IOException e) {
      throw new InvalidOperationException("I/O error", e);
    }
  }
264266
private void generate(TemplateFile input, List<OutputFile> outputs, TemplateOptions templateOptions) throws IOException {
    final String targetFileName = targetFileName(templatesPath.relativize(input.path).toString(), templateOptions);
    final OutputFile output = new OutputFile(outputPath.resolve(targetFileName).toAbsolutePath().normalize());

    if (incremental &&
        Files.exists(output.path) &&
        Files.getLastModifiedTime(output.path).toMillis() >= Files.getLastModifiedTime(input.path).toMillis()) {
      // No need to re-render but mark as generated.
      output.upToDate = true;
      outputs.add(output);
      return;
    }

    String template = new String(Files.readAllBytes(input.path), StandardCharsets.UTF_8);

    timeVelocity.start();
    template = filterVelocity(input, template, templateOptions);
    timeVelocity.stop();

    // Check if template requested ignoring a given type combination.
    if (templateOptions.isIgnored()) {
      return;
    }

    getLog().debug("Processing: " + input.getFileName() + " => " + output.path);
    try {
      timeIntrinsics.start();
      template = filterIntrinsics(template, templateOptions);
      timeIntrinsics.stop();
  
      timeComments.start();
      template = filterComments(template);
      timeComments.stop();
  
      timeTypeClassRefs.start();
      template = filterTypeClassRefs(template, templateOptions);
      template = filterStaticTokens(template, templateOptions);
      timeTypeClassRefs.stop();
    } catch (RuntimeException e) {
      getLog().error("Error processing: " + input.getFileName() + " => " + output.path + ":\n\t" + e.getMessage());
      throw e;
    }

    Files.createDirectories(output.path.getParent());
    Files.write(output.path, template.getBytes(StandardCharsets.UTF_8));

    outputs.add(output);
  }
1361104
public static void transformFile(Source stylesheetFile, File input, File output) throws TransformerException {
    TransformerFactory factory = TransformerFactory.newInstance();
    factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
    Transformer transformer = factory.newTransformer(stylesheetFile);
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.transform(new StreamSource(input), new StreamResult(output));
  }
406469
@GwtIncompatible("Unnecessary")
  private String getMapPath(String outputFile) {
    String basePath = "";

    if (outputFile.isEmpty()) {
      // If we have a js_module_binary rule, output the maps
      // at modulename_props_map.out, etc.
      if (!config.moduleOutputPathPrefix.isEmpty()) {
        basePath = config.moduleOutputPathPrefix;
      } else {
        basePath = "jscompiler";
      }
    } else {
      // Get the path of the output file.
      File file = new File(outputFile);

      String outputFileName = file.getName();

      // Strip the .js from the name.
      if (outputFileName.endsWith(".js")) {
        outputFileName =
            outputFileName.substring(0, outputFileName.length() - 3);
      }

      String fileParent = file.getParent();
      if (fileParent == null) {
        basePath = outputFileName;
      } else {
        basePath = file.getParent() + File.separatorChar + outputFileName;
      }
    }

    return basePath;
  }
764620
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
    public C intoOutfile(File file) {
        return addFlag(Position.END, "\ninto outfile '" + file.getPath() + "'");
    }
1091533
public static File extractFileGzip(String _compressedFile, String _outputFileName) {
        return decompress(CompressionMethod.GZIP, _compressedFile, _outputFileName);
    }
798858
public void writePropertiesToFile(File outputFile) throws MojoExecutionException {// NOSONAR
        stripOutReservedProperties();
        //TODO if jmeter.properties write properties that are required for plugin
        if (properties.isEmpty()) {
            return;
        }
        try {
            try (FileOutputStream writeOutFinalPropertiesFile = new FileOutputStream(outputFile)) {
                properties.store(writeOutFinalPropertiesFile, null);
                writeOutFinalPropertiesFile.flush();
            }
        } catch (IOException e) {
            throw new MojoExecutionException(e.getMessage(), e);
        }
    }
718347
@Override
	protected void generateFileHeader(QualifiedName qualifiedName, ExtraLanguageAppendable appendable,
			IExtraLanguageGeneratorContext context) {
		appendable.append(PYTHON_FILE_HEADER);
		appendable.newLine();
		appendable.append(getGenerationComment(context));
		appendable.newLine().newLine();
	}
737953
public void writeTreesInOneLineFormat(File outFile) throws IOException {
        BufferedWriter writer = new BufferedWriter(new FileWriter(outFile));
        for (BinaryTree tree : this) {
            writer.write(tree.getAsOneLineString());
            writer.write("\n");
        }
        writer.close();        
    }
544053
public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile)
    throws IOException {
    return fs.startLocalOutput(fsOutputFile, tmpLocalFile);
  }
712424
public void NeEvl(String outputPath) throws IOException{


		String res = "";
		res += calcByLength()+"\n";
		res += calcByType()+"\n";
		res += calcByOOV()+"\n";
		res += calcByCOOV()+"\n";
		res += calcByOOV2()+"\n";
		res += calcByOOVRate()+"\n";



		if(outputPath != null ){
			File outFile =new File(outputPath);
			Writer out=new OutputStreamWriter(new FileOutputStream(outFile));
			out.write(res);
			out.close();
		}

	}
209360
public static void appendStringInto( String s, File outputFile ) throws IOException {

		OutputStreamWriter fw = null;
		try {
			fw = new OutputStreamWriter( new FileOutputStream( outputFile, true ), StandardCharsets.UTF_8 );
			fw.append( s );

		} finally {
			Utils.closeQuietly( fw );
		}
	}
791425
public static void dump(DataSource dataSource, File outputFile) {
    try (Log log = Log.create(outputFile)) {
      log.write(CallInfo.create(), executeQuery(dataSource));
    } 
  }
565911
public static FileUtils.FileCopyResult gzip(final File inFile, final File outFile)
  {
    return gzip(inFile, outFile, FileUtils.IS_EXCEPTION);
  }