/** * This method saves the given {@code InputStream} to a file representing by the provided path. The {@code InputStream} is not closed. * * @param inputStream {@code InputStream} to save * @param path the path to the file to be created */ public static void saveToFile(final InputStream inputStream, final String path) { final FileOutputStream fileOutputStream = toFileOutputStream(path); try { copy(inputStream, fileOutputStream); } finally { closeQuietly(fileOutputStream); } }