2011-01-25から1日間の記事一覧

java.net.HttpURLConnection を用いた実装にあたっての注意点

HttpURLConnectionクラスは,以下のように利用されるのが一般的である. URL url = new URL("http://foo.com/hoge.html"); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); int responseCode conn.getResponseCode(); InputStream is = …