Given a string representation of a host, return its ip address
in textual presentation.

@param name a string representation of a host:
either a textual representation its IP address or its host name
@return its IP address in the string format
489090
public static String normalizeHostName(String name) {
    try {
      return InetAddress.getByName(name).getHostAddress();
    } catch (UnknownHostException e) {
      return name;
    }
  }
545355
public static String getString(String name) {
        Resources res = Resources.getSystem();
        int id = res.getIdentifier(name, TYPE_STRING, NATIVE_PACKAGE);
        return id == 0 ? null : res.getString(id);
    }
1034277
public static SerializationFormat getOutputFormat(String name) {
        for (SerializationFormat ft : Instance.serializationFormats) {
            if (ft.isAcceptedAsOutput(name)) {
                return ft;
            }
        }
        return null;
    }
1111784
public static String getIp(String host) {
		InetAddress address;
		try {
			address = InetAddress.getByName(host);
		}
		catch (UnknownHostException e) {
			return null;
		}
		return address.getHostAddress();
	}
609250
public void expectDomainName(String name) {
        expectDomainName(name, messages.get(Validation.IPV4_KEY.name(), name));
    }
757304
public String getParameter(String name) {
		if(name == null) {
			throw new NullPointerException("the parameter given in parameter is null !");
		}
		String value = this.parameters.get(name);
		if(value != null) {
			return RFC2396UrlDecoder.decode(value);
		} else {
			if("lr".equals(name)) return "";// special case to pass Addressing spec test from 289 TCK
		}
		return null;
	}
694315
public static String getParam(String name) {
		String param = getServletRequest().getParameter(name);
		if(null == param){
			MultipartFormData multipart = getMultipart();
			if(null != multipart){
				param = multipart.getParam(param);
			}
		}
		return param;
	}
928617
public String getString(String name)
    {
        List part = _partMap.getValues(name);
        if (part==null)
            return null;
        if (_encoding != null)
        {
            try 
            {
                return new String(((Part)part.get(0))._data, _encoding);
            } 
            catch (UnsupportedEncodingException uee) 
            {
                if (log.isDebugEnabled())log.debug("Invalid character set: " + uee);
                return null;
            }
        }
        else
            return new String(((Part)part.get(0))._data);
    }
176872
public InetAddress getInetAddress() throws UnknownHostException{
     if(ip!=null) return ip;

     return (ip=InetAddress.getByName(host));
   }
587298
private static String getHostAddress(InetSocketAddress addr) {
    String hostToAppend = "";
    if (addr.isUnresolved()) {
      hostToAppend = addr.getHostName();
    } else {
      hostToAppend = addr.getAddress().getHostAddress();
    }
    return hostToAppend;
  }
1024824
public int getIndex(String name) {
        for (int i = 0; i < configs.length; i++) {
            Provider p = getProvider(i);
            if (p.getName().equals(name)) {
                return i;
            }
        }
        return -1;
    }
148406
public String getMimeType(final String name) {
		String mimeType = null;
		if (name != null && name.length() > 0 && name.contains(".")) {
			final String[] segments = name.split("\\.");
			mimeType = mimeMappings.get(segments[segments.length - 1]);
		}
		if (mimeType == null) {
			mimeType = httpContext.getMimeType(name);
		}
		return mimeType;
	}
1216023
protected static String nameToId(String name) {
        try {
            return URLEncoder.encode(name, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            // should not happen
            throw new RuntimeException("Unsupported encoding", e);
        }
    }
982389
public static final String getHostName() {
		if (cachedHostName != null) {
			return cachedHostName;
		}

		// User-defined public hostname
		String name = System.getProperty("hostname");
		if (name == null || name.isEmpty()) {
			try {
				name = InetAddress.getLocalHost().getHostName();
			} catch (Exception ignored) {
				name = null;
			}
		}
		if (name == null || name.isEmpty() || name.contains("localhost")) {
			try {
				name = System.getenv().get("COMPUTERNAME");
			} catch (Exception ignored) {
				name = null;
			}
		}
		if (name == null || name.isEmpty()) {
			cachedHostName = "localhost";
		} else {
			cachedHostName = name.toLowerCase();
		}
		return cachedHostName;
	}
1299503
public String getHeader(String name) {
		if(name == null) {
			throw new NullPointerException("header name is null");
		}
		try {
			return RFC2396UrlDecoder.decode(((javax.sip.address.SipURI) super.uri).getHeader(name));
		} catch (NullPointerException e) {
			return null;
		}
	}
1110804
public String getHost() {
		String host = getAsNullableString("host");
		host = host != null ? host : getAsNullableString("ip");
		return host;
	}
1172066
public static SerializationFormat getInputFormat(String name) {
        for (SerializationFormat ft : Instance.serializationFormats) {
            if (ft.isAcceptedAsInput(name)) {
                return ft;
            }
        }
        return null;
    }