HTTPステータスを得る.

import java.io.*;
import java.net.*;

public class tmp {
    public static void main(String[] args){
	try {
	    URI uri = new URI("http://d.hatena.ne.jp/hmwr_k/20090110/1231563213");
	    HttpURLConnection connection = (HttpURLConnection)uri.toURL().openConnection();
	    int statusCode = connection.getResponseCode();
	    System.out.println(statusCode);
	} catch(Exception e){
	    System.err.println(e);
	}
    }
}