public static void access(String urlstring) throws IOException {
    URL url = new URL(urlstring);

    URLConnection connection = url.openConnection();
    connection.connect();

    try (BufferedReader in = new BufferedReader(
      new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
      for (; in.readLine() != null;) {
        continue;
      }
    } catch (IOException ioe) {
      LOG.info("Got exception: ", ioe);
    }
  }
access a url, ignoring some IOException such as the page does not exist
hbase-http/src/test/java/org/apache/hadoop/hbase/http/HttpServerFunctionalTest.java