private void checkLink(String href) throws UnknownHostException, MalformedURLException {
    if (href.length() > 1)
      if (!href.contains("@")) {
        if (!href.contains("http://")) {
          href = base_url + href;
        }
        String ipToCheck = checkDNS(href);
        if (ipToCheck != null)
          if (baseIP.contains(ipToCheck)) {
            if (!temporaryInternalHrefs.contains(href)) {
              addItemToHrefs(href);
              System.out.println("Dodano " + href + " do linków wewnętrznych");
            }
          } else {
            if (!temporaryExternalHrefs.contains(href)) {
              temporaryExternalHrefs.add(href);
              System.out.println("Dodano " + href + " do linków zewnętrznych");
            }
          }
      }

  }