Writes the trees to a file.
@param outFile The output file.
@throws IOException
971013
public void writeTreesInPtbFormat(File outFile) throws IOException {
        BufferedWriter writer = new BufferedWriter(new FileWriter(outFile));
        for (IntNaryTree tree : this) {
            writer.write(tree.getAsPennTreebankString());
            writer.write("\n\n");
        }
        writer.close();        
    }
863702
public void writeTo(OutputStream out) throws IOException {
        if (!(out instanceof DataOutput)) {
            out = new DataOutputStream(out);
        }

        writeTo((DataOutput)out);

        out.flush();
    }
905144
public static void writeStreamToFile(InputStream isr, String fileName, String outputFolder) throws IOException {
        logger.entering(new Object[] { isr, fileName, outputFolder });
        FileUtils.copyInputStreamToFile(isr, new File(outputFolder + "/" + fileName));
        logger.exiting();
    }
626294
public void write(Writer out)
         throws IOException
    {
        for (int i=0; i <elements.size() ; i++)
        {
            Object element = elements.get(i);
          
            if (element instanceof Element)
                ((Element)element).write(out);
            else if (element==null)
                out.write("null");
            else 
                out.write(element.toString());
        }
    }
443499
public void writeTo(final OutputStream out) throws IOException
	{
		if(out == null) throw new NullPointerException();
		
		final int n = arrays.size();
		for(int k = 0; k < n; k++) {
			byte[] src = (byte[])arrays.get(k);
			out.write(src);
		}
		if(pos > 0) out.write(buffer, 0, pos);
	}
928710
public static void writeStringInto( String s, File outputFile ) throws IOException {
		InputStream in = new ByteArrayInputStream( s.getBytes( StandardCharsets.UTF_8 ));
		copyStream( in, outputFile );
	}
89188
public void write(OutputStream out)
         throws IOException
    {
        Writer writer = new OutputStreamWriter(out);
        write(writer);
        writer.flush();
    }
482438
public static void write(ObjectOutput out, java.lang.reflect.Field field) throws IOException {
        if (field == null) {
            ClassRef.write(out, null);
        } else {
            ClassRef.write(out, field.getDeclaringClass());
            out.writeUTF(field.getName());
        }
    }
138189
public void writeTo(T object, TreePruner pruner, DataWriter writer) throws IOException {
        writer.type(null,object.getClass());
        writer.startObject();
        writeNestedObjectTo(object, pruner, writer);
        writer.endObject();
    }
450817
public void write(OutputStream out) throws IOException {
		for(HttpHeader header: this) {
			header.write(out);
		}
		out.write(CR);
		out.write(LF);
	}
528271
public static void dump(DataSet data, File outputFile) {
    try (Log log = Log.create(outputFile)) {
      log.write(CallInfo.create(), data);
    } 
  }
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);
        }
    }
1354521
private void createOutputFile() throws IOException {
        this.fileChannel = Files.newByteChannel(Paths.get(filePath), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING);
    }
926450
public boolean dumpTo(File outFile) throws IOException {
        if (exists()) {
            dump(getOffset(), outFile);
            return true;
        } else {
            return false;
        }
    }
95447
public static void writePropertiesFile( Properties properties, File file ) throws IOException {

		OutputStream out = null;
		try {
			out = new FileOutputStream( file );
			properties.store( out, "" );

		} finally {
			closeQuietly( out );
		}
	}
815257
private void writeObject(ObjectOutputStream out) throws IOException {
		out.writeUTF(hadoopOutputFormatName);
		jobConf.write(out);
		out.writeObject(converter);
		out.writeObject(fileOutputCommitterWrapper);
	}
1125929
public void setOutputfile(String outputfile) {
	try {
	    this.outputfile = ResourceUtil.toResourceExistingParent(pageContext, outputfile);
	    pageContext.getConfig().getSecurityManager().checkFileLocation(this.outputfile);

	}
	catch (PageException e) {
	    this.outputfile = pageContext.getConfig().getTempDirectory().getRealResource(outputfile);
	    if (!this.outputfile.getParentResource().exists()) this.outputfile = null;
	    else if (!this.outputfile.isFile()) this.outputfile = null;
	    else if (!this.outputfile.exists()) {
		ResourceUtil.createFileEL(this.outputfile, false);
		// try {
		// this.outputfile.createNewFile();
		/*
		 * } catch (IOException e1) { this.outputfile=null; }
		 */
	    }
	}
    }