import java.net.URL;
import java.net.URLConnection;
import java.io.InputStream;
public class Main{
public static void main(String[] args){
try{
URL image = new URL("http://www.google.co.id/images/"
+"srpr/nav_logo27.png");
URLConnection conn = image.openConnection();
InputStream input = conn.getInputStream();
int biner = 0;
while(biner!=-1){
biner = input.read();
System.out.print((char)biner);
}catch(Exception ex){
ex.printStackTrace();
}
}
}
}
No comments:
Post a Comment