class Misc {

	public static void streamToFile(InputStream inputStream, File file) throws IOException {
		try (OutputStream fileOut = new FileOutputStream(file)) {
			Misc.streamToStream(inputStream, fileOut);
		}
	}

}