Created
February 8, 2015 21:04
-
-
Save RX14/77fc0350fe5779c8150c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// just to close the streams... | |
try (ReadableByteChannel channel = Channels.newChannel(connect.getInputStream()); | |
FileOutputStream outStream = new FileOutputStream(outFile)) | |
{ | |
outStream.getChannel().transferFrom(channel, 0, Long.MAX_VALUE); | |
outStream.flush(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment