You could use HttpURLConnection, streams, and a ReadableByteChannel.
I feel this helps down the line for adding request info to the connection.
try { URL test = new URL(/* link to your resource */); HttpURLConnection httpcon = (HttpURLConnection) test.openConnection(); httpcon.addRequestProperty("User-Agent", "Mozilla/5.0"); ReadableByteChannel rbc = Channels.newChannel(httpcon.getInputStream()); FileOutputStream fos = new FileOutputStream(/* File output here */); fos.getChannel().transferFrom(rbc, 0, 1 << 24); fos.close(); } catch (FileNotFoundException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); }