/** * Caching version of InetAddress.getByName(getOption("host")).getAddress(), which is slow. Caches * numeric host names only. Will resolve but not cache resolution of DNS host names. * * @return IP or null * @since 0.9.3 */ public byte[] getIP() { if (_ip != null) return _ip; byte[] rv = null; String host = getHost(); if (host != null) { rv = Addresses.getIP(host); if (rv != null && (host.replaceAll("[0-9\\.]", "").length() == 0 || host.replaceAll("[0-9a-fA-F:]", "").length() == 0)) { _ip = rv; } } return rv; }