/** * Check if the uri returns a non-404 * * @param uri * @return true if no exception, false if 404 * @throws IOException */ protected boolean check(String uri) throws IOException { try { client.get(createRequest().setUri(uri)); return true; } catch (RequestException e) { if (e.getStatus() == HTTP_NOT_FOUND) return false; throw e; } }