336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

package URL;

import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

public class newURL {
    public static void main(String[] argv) throws Exception{
        URLConnection conn=new URL("http://127.0.0.1").openConnection();
        conn.setDoInput(true);
        conn.setRequestProperty("Authorization", "asdfasdf");
        conn.connect();
       
        InputStream in=conn.getInputStream();
        System.out.println(conn);
        System.out.println(in);
    }
}

'Java' 카테고리의 다른 글

URL : openConnection()  (0) 2015.01.25
URL : getAuthority()  (0) 2015.01.25
InetAddress : isReacheable(int timeout)  (0) 2015.01.25
InetAddress : getLocalHost()  (0) 2015.01.25
InetAddress : getHostName()  (0) 2015.01.25
Posted by af334