- /**\r
- * Helper method to determine if we have received the response class we are expecting.\r
- *\r
- * @param response the http response we got from our request\r
- * @param expectedClass the expected http response class ie: 1, 2, 3, 4, 5 which maps to 1xx, 2xx,\r
- * 3xx, 4xx, 5xx respectively\r
- * @return true if the response if of our expected class and false if not\r
- */\r
- private static boolean isExpectedHttpResponseClass(int response, char expectedClass) {\r
- if (response < 100 || response >= 600) {\r
- return false;\r
- }\r
-\r
- if (Integer.toString(response).charAt(0) == expectedClass) {\r
- return true;\r
- }\r
-\r
- return false;\r
- }\r