以下は、Java ネットワークで 503 応答コードを処理する適切な方法でしょうか? このコード、特に切断と null の呼び出しは何をしますか?
URL url = new URL(some url);
HttpURLConnection h =(HttpURLConnection)url.openConnection();
int x = h.getResponseCode();
while(x==503)
{
h.disconnect();
h = null;
h =(HttpURLConnection)url.openConnection();
x = h.getResponseCode();
}