code: public static <X> X runWithFile(InputStream stream, Function<File, X> function) throws IOException {
  		File f = File.createTempFile("run-with-file", null);
  		try {
  			try (FileOutputStream out = new FileOutputStream(f)) {
  				IOUtils.copy(stream, out);
  			}
  			return function.apply(f);
  		} finally {
  			f.delete();
  		}
  	}
docs: Copy the data from the given {@link InputStream} to a temporary file and call the given
  {@link Function} with it; after the function returns the file is deleted.