Code example for UnknownHostException

0
 
  @Override 
  public InetAddress getInetAddressByName(String host) throws UnknownHostException {
    hostSearches.add(host);
    if (!resolvedHosts.containsKey(host)) {
      throw new UnknownHostException(host);
    } 
    return resolvedHosts.get(host);
  } 
 
  @Override 
  public InetAddress getByExactName(String host) {
    return super.getByExactName(host);
  } 
   
  @Override 
  public InetAddress getByNameWithSearch(String host) {
    return super.getByNameWithSearch(host);
  } 
   
Stop searching for code, let great code find you!  Add Codota to your java IDE