Skip to content

Instantly share code, notes, and snippets.

@stoilkr2010
stoilkr2010 / script.java
Last active July 21, 2022 16:21
Java bat to download from websites
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);