Пытался сделать так
URL url = new URL("http://xxxxx.com/img/logo.png");
ReadableByteChannel rbc = Channels.newChannel(url.openStream());
FileOutputStream fos = new FileOutputStream("X:\\Users\\XX\\xxxxxx\\xxxx\\xxxxxx\\logo.png");
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
но получал
java.io.IOException: Server returned HTTP response code: 403 for URL: http://xxxxx.com/img/logo.png