import java.io.*; import java.net.URL; public class Voog3c{ public static void main(String argumendid[]) throws IOException{ String aadress="http://minitorn.tpu.ee/~jaagup/kool/java/javalogo52x88.gif"; InputStream sisse= new URL(aadress).openConnection().getInputStream(); OutputStream valja=new FileOutputStream("pilt.gif"); int nr=sisse.read(); while(nr>=0){ valja.write(nr); nr=sisse.read(); } sisse.close(); valja.close(); } }