This file contains 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
URL website = new URL("http://your-file-url.com/file-name.zip"); | |
ReadableByteChannel rbc = Channels.newChannel(website.openStream()); | |
FileOutputStream fos = new FileOutputStream("file-name.zip"); | |
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); |