Vê se isso aqui funciona pra voce:
URL urlObj = new URL(//img que vc quer baixar.);
HttpURLConnection httpConnection = (HttpURLConnection)urlObj.openConnection();
httpConnection.setRequestMethod("GET");
InputStream inputStream = httpConnection.getInputStream();
OutputStream outputStream = null;
try {
int read = 0;
byte[] bytes = new byte[1024];
outputStream = new FileOutputStream(new File(pathToSave));
while ((read = inputStream.read(bytes)) != -1) {
outputStream.write(bytes, 0, read);
}
} catch (FileNotFoundException ex) {
ex.getMessage();
} catch (IOException ex) {
ex.getMessage();
} finally {
try {
if (outputStream != null) {
outputStream.close();
}
} catch (IOException ex) {
ex.getMessage();
}
}
URL urlObj = new URL(//img que vc quer baixar.);
HttpURLConnection httpConnection = (HttpURLConnection)urlObj.openConnection();
httpConnection.setRequestMethod("GET");
InputStream inputStream = httpConnection.getInputStream();
OutputStream outputStream = null;
try {
int read = 0;
byte[] bytes = new byte[1024];
outputStream = new FileOutputStream(new File(pathToSave));
while ((read = inputStream.read(bytes)) != -1) {
outputStream.write(bytes, 0, read);
}
} catch (FileNotFoundException ex) {
ex.getMessage();
} catch (IOException ex) {
ex.getMessage();
} finally {
try {
if (outputStream != null) {
outputStream.close();
}
} catch (IOException ex) {
ex.getMessage();
}
}