Merge pull request #5621 from holgerl/patch-1
FileOutputStream is never closed
This commit is contained in:
commit
06d925e90d
@ -45,6 +45,7 @@ public class FileDownload {
|
|||||||
FileOutputStream fileOutputStream = new FileOutputStream(localFilename); FileChannel fileChannel = fileOutputStream.getChannel()) {
|
FileOutputStream fileOutputStream = new FileOutputStream(localFilename); FileChannel fileChannel = fileOutputStream.getChannel()) {
|
||||||
|
|
||||||
fileChannel.transferFrom(readableByteChannel, 0, Long.MAX_VALUE);
|
fileChannel.transferFrom(readableByteChannel, 0, Long.MAX_VALUE);
|
||||||
|
fileOutputStream.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user