mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-12 18:17:02 +00:00
Update FileUtils.java
This commit is contained in:
1 parent
78a303212d
commit
9be144d2c6
1 file changed
+1
-2
@@ -449,14 +449,13 @@ public abstract class FileUtils {
|
||||
|
||||
public static void writeInputStreamToFile(File file, InputStream inputStream) {
|
||||
FileOutputStream fileOutputStream = null;
|
||||
OutputStreamWriter outputStreamWriter = null;
|
||||
try {
|
||||
fileOutputStream = openOutputStream(file, true);
|
||||
IOUtils.copy(inputStream, fileOutputStream);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
IOUtils.closeIO(outputStreamWriter, fileOutputStream);
|
||||
IOUtils.closeIO(fileOutputStream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user