I am wondering what the proper way to go about downloading the image from this RUL would be: http://www.hidemyass.com/proxy-list/img/port/7018246/1
The way I tried downl
You can get image type from their content type - URLConnection.getContentType() or from byte array:
content="http://www.google.ru/images/logo.png".toURL().getBytes()
ext=URLConnection.guessContentTypeFromStream(new ByteArrayInputStream(content)).replaceFirst("^image/","")
new File("logo."+ext).setBytes(content)