Possible resource leak fix

This commit is contained in:
Olof Larsson 2013-01-10 13:58:19 +01:00
parent f3530d521b
commit 6b8baafa37

View File

@ -96,6 +96,7 @@ public class DiscUtil
ReadableByteChannel rbc = Channels.newChannel(url.openStream()); ReadableByteChannel rbc = Channels.newChannel(url.openStream());
FileOutputStream fos = new FileOutputStream(file); FileOutputStream fos = new FileOutputStream(file);
fos.getChannel().transferFrom(rbc, 0, 1 << 24); fos.getChannel().transferFrom(rbc, 0, 1 << 24);
fos.close();
return true; return true;
} }
catch (Exception e) catch (Exception e)