public static long copyByteProviderToFile(ByteProvider provider, File destFile,
			TaskMonitor monitor) throws IOException, CancelledException {
		try (InputStream is = provider.getInputStream(0);
				FileOutputStream fos = new FileOutputStream(destFile)) {
			return streamCopy(is, fos, monitor);
		}
	}
Copy the contents of a {@link ByteProvider} to a file.

@param provider {@link ByteProvider} source of bytes
@param destFile {@link File} destination file
@param monitor {@link TaskMonitor} to update
@return number of bytes copied
@throws IOException if error
@throws CancelledException if cancelled
Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FSUtilities.java