public final static long copyStreamToFile(InputStream in, File toFile, boolean append,
			TaskMonitor monitor) throws IOException {

		try (OutputStream out = new FileOutputStream(toFile, append)) {
			return copyStreamToStream(in, out, monitor);
		}
	}
Copy the in stream to the toFile.  The toFile will be overwritten or created.
@param in source input stream
@param toFile destination file
@param append if true and the file exists, the fromFile contents will be
appended to the toFile.
@param monitor if specified the progress will be reset and will advance to
100% when the copy is complete.
@return number of bytes copied from source file to destination file
@throws IOException thrown if there was a problem accessing the files
Ghidra/Framework/Utility/src/main/java/utilities/util/FileUtilities.java