是可重试的HTTP响应代码
//package com.nowjava; /* 来自 时 代 J a v a - N o w J a v a . c o m*/ public class Main { public static boolean isResponseCodeRetryable(int responseCode) { if (responseCode >= 400 && responseCode <= 499) { // 4xx if (responseCode == 408 // Request Timeout ) { return true; } else { return false; } } else if (responseCode >= 500 && responseCode <= 599) { // 5xx if (responseCode == 500 || // Internal Server Error responseCode == 505 || // HTTP Version Not Supported responseCode == 506 // Variant Also Negotiates (RFC 2295) ) { return false; } else