Code/JAVA

JAVA Get Web Image

sidcode 2010. 7. 6. 01:20

BaseCode :
    private BufferedImage img;
    private String url;
    private URL u;
   
    public test(int x, int y, String url){
        this.x = x;
        this.y = y;
        this.url = url; //  http://img0.gmodules.com/ig/images/korea/logo.gif
       
        init();
    }

    public void init(){
        try {
                u = new URL(this.url);
                img = ImageIO.read(u);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }       
    }


WEB에 있는 이미지 를 마구 긁어 와주마!!!!